(no commit message)
authorerik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Tue, 27 Jul 2010 19:09:03 +0000 (19:09 +0000)
committererik <erik@77661180-640e-0410-b3a8-9f9b13e6d0e0>
Tue, 27 Jul 2010 19:09:03 +0000 (19:09 +0000)
wicket/components/src/test/java/org/wamblee/wicket/page/WebApplicationBasePageTest.java

index 8d97be9b4b21a11b6403c01cfc4a9ddbf85df542..707871c025c1709a64e62c1f106e7cc32121b373 100644 (file)
@@ -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());