public void callBeforeRender() {
onBeforeRender();
}
+
+ public void callOnDetach() {
+ onDetach();
+ }
}
@Test
page.callSetHeaders();
verify(behavior).setHeaders(same(page), same(response));
verifyNoMoreInteractions(behavior);
+
+ reset(behavior);
+ page.callOnDetach();
+ verify(behavior).onDetach(same(page));
+ verifyNoMoreInteractions(behavior);
}
@Test
- public void testSmokeBehaviorViewOnlyOnce() throws Exception {
+ public void testSmokeExpirePageImmediatelyBehavior() throws Exception {
WebApplicationBasePage page = new WebApplicationBasePage(
mock(IPageMap.class), new PageParameters());
page.addBehavior(new ExpirePageImmediatelyBehavior());