You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by sc...@apache.org on 2006/02/21 16:54:07 UTC

svn commit: r379503 - /myfaces/tomahawk/trunk/core/src/test/java/org/apache/myfaces/custom/tree2/TreeWalkerBaseTest.java

Author: schof
Date: Tue Feb 21 07:54:06 2006
New Revision: 379503

URL: http://svn.apache.org/viewcvs?rev=379503&view=rev
Log:
added test for reset method

Modified:
    myfaces/tomahawk/trunk/core/src/test/java/org/apache/myfaces/custom/tree2/TreeWalkerBaseTest.java

Modified: myfaces/tomahawk/trunk/core/src/test/java/org/apache/myfaces/custom/tree2/TreeWalkerBaseTest.java
URL: http://svn.apache.org/viewcvs/myfaces/tomahawk/trunk/core/src/test/java/org/apache/myfaces/custom/tree2/TreeWalkerBaseTest.java?rev=379503&r1=379502&r2=379503&view=diff
==============================================================================
--- myfaces/tomahawk/trunk/core/src/test/java/org/apache/myfaces/custom/tree2/TreeWalkerBaseTest.java (original)
+++ myfaces/tomahawk/trunk/core/src/test/java/org/apache/myfaces/custom/tree2/TreeWalkerBaseTest.java Tue Feb 21 07:54:06 2006
@@ -207,5 +207,22 @@
         assertFalse("unxpected return value", treeWalker.next());
     }
 
-
+    /**
+     * Walk through the tree.  Then call reset.  Make sure the tree is walked through again
+     * from the beginning.  This can be tested by running some of the other tests twice with
+     * a call to reset in between.
+     */
+    public void testReset()
+    {
+        try
+        {
+            testNextCheckState();
+            treeWalker.reset();
+            testNextCheckState();
+        }
+        catch (Exception e)
+        {
+            fail("Unable to successfuly check the next method twice with a reset");
+        }
+    }
 }