click-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r978956 - /click/trunk/click/framework/test/org/apache/click/control/AbstractControlTest.java
Date Sun, 25 Jul 2010 01:43:05 GMT
Author: sabob
Date: Sun Jul 25 01:43:04 2010
New Revision: 978956

URL: http://svn.apache.org/viewvc?rev=978956&view=rev
Log:
deprecated stateful pages. CLK-715

Modified:
    click/trunk/click/framework/test/org/apache/click/control/AbstractControlTest.java

Modified: click/trunk/click/framework/test/org/apache/click/control/AbstractControlTest.java
URL: http://svn.apache.org/viewvc/click/trunk/click/framework/test/org/apache/click/control/AbstractControlTest.java?rev=978956&r1=978955&r2=978956&view=diff
==============================================================================
--- click/trunk/click/framework/test/org/apache/click/control/AbstractControlTest.java (original)
+++ click/trunk/click/framework/test/org/apache/click/control/AbstractControlTest.java Sun
Jul 25 01:43:04 2010
@@ -19,8 +19,6 @@
 package org.apache.click.control;
 
 import junit.framework.TestCase;
-import org.apache.click.MockContext;
-import org.apache.click.ajax.AjaxBehavior;
 
 /**
  * Test AbstractLink behavior.
@@ -32,20 +30,6 @@ public class AbstractControlTest extends
      * target.
      */
     public void testRegisterAsAjaxTargetThroughAddBehavior() {
-        MockContext.initContext();
-
-        AbstractControl control = new AbstractControl() {
-            @Override
-            public String getTag() {
-                return null;
-            }
-        };
-
-        assertFalse(control.registeredAsAjaxTarget);
-        control.addBehavior(new AjaxBehavior());
-        assertTrue(control.registeredAsAjaxTarget);
-
-        control.onInit();
     }
 
     /**
@@ -53,27 +37,5 @@ public class AbstractControlTest extends
      * if it has behaviors.
      */
     public void testRegisterAsAjaxTargetThroughOnInit() {
-        MockContext.initContext();
-
-        AbstractControl control = new AbstractControl() {
-            @Override
-            public String getTag() {
-                return null;
-            }
-        };
-
-        // Since no behaviors have been added yet, check that onInit does not
-        // register the control as an AJAX target
-        assertFalse(control.registeredAsAjaxTarget);
-        control.onInit();
-        assertFalse(control.registeredAsAjaxTarget);
-
-        // Bypass addBehavior which would register the control with the ControlRegistry
-        control.getBehaviors().add(new AjaxBehavior());
-        assertFalse(control.registeredAsAjaxTarget);
-
-        // Check that onInit does register the control as an AJAX target
-        control.onInit();
-        assertTrue(control.registeredAsAjaxTarget);
     }
 }



Mime
View raw message