From f24a05e319ffe4bd6cf50fd9f4ef005e5ed97d1d Mon Sep 17 00:00:00 2001 From: erik Date: Tue, 27 Jul 2010 19:09:03 +0000 Subject: [PATCH] --- .../wicket/page/WebApplicationBasePageTest.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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()); -- 2.31.1