From: erik Date: Tue, 27 Jul 2010 19:09:03 +0000 (+0000) Subject: (no commit message) X-Git-Tag: wamblee-utils-0.5~55 X-Git-Url: http://wamblee.org/gitweb/?a=commitdiff_plain;h=f24a05e319ffe4bd6cf50fd9f4ef005e5ed97d1d;p=utils --- diff --git a/wicket/components/src/test/java/org/wamblee/wicket/page/WebApplicationBasePageTest.java b/wicket/components/src/test/java/org/wamblee/wicket/page/WebApplicationBasePageTest.java index 8d97be9b..707871c0 100644 --- a/wicket/components/src/test/java/org/wamblee/wicket/page/WebApplicationBasePageTest.java +++ b/wicket/components/src/test/java/org/wamblee/wicket/page/WebApplicationBasePageTest.java @@ -136,6 +136,10 @@ public class WebApplicationBasePageTest { public void callBeforeRender() { onBeforeRender(); } + + public void callOnDetach() { + onDetach(); + } } @Test @@ -159,10 +163,15 @@ public class WebApplicationBasePageTest { 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());