From: Erik Brakkee Date: Tue, 27 Jul 2010 19:09:03 +0000 (+0000) Subject: (no commit message) X-Git-Tag: wamblee-utils-0.7~161 X-Git-Url: http://wamblee.org/gitweb/?a=commitdiff_plain;ds=inline;h=9c10393a2c243107cf1c9b28d75d6009f0820cec;hp=3098abd367ccffefe6bca91b87cfda06a8bd0d51;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());