(no commit message)
authorErik Brakkee <erik@brakkee.org>
Tue, 27 Jul 2010 19:09:03 +0000 (19:09 +0000)
committerErik Brakkee <erik@brakkee.org>
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());