org.apache.myfaces.custom.tree2
Class TreeWalkerBaseTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.myfaces.custom.tree2.TreeWalkerBaseTest
All Implemented Interfaces:
junit.framework.Test

public class TreeWalkerBaseTest
extends junit.framework.TestCase

- .. Root (0) | - .. A (0:0) | | | + .. AA (0:0:0) | | | + .. AB (0:0:1) | | | + .. AC (0:0:2) | | .. aca (0:0:2:0) | | .. acb (0:0:2:1) | + .. B (0:1) | | | + .. BA (0:1:0) | | | + .. BB (0:1:1) | | .. C (0:2) | | .. d (0:3)


Constructor Summary
TreeWalkerBaseTest()
           
 
Method Summary
protected  void setUp()
           
 void testGetRootNodeId()
           
 void testNextCheckState()
          Walk through all of the nodes and make sure the return value is correct as well as the current node of the tree.
 void testNextNoCheckState()
          Walk through all of the nodes and make sure the return value is correct as well as the current node of the tree.
 void testReset()
          Walk through the tree.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TreeWalkerBaseTest

public TreeWalkerBaseTest()
Method Detail

setUp

protected void setUp()
              throws Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
Exception

testGetRootNodeId

public void testGetRootNodeId()
                       throws Exception
Throws:
Exception

testNextCheckState

public void testNextCheckState()
                        throws Exception
Walk through all of the nodes and make sure the return value is correct as well as the current node of the tree. Continue until the walker runs out of nodes. Since the checkState property is true only the expanded nodes will be walked.

Throws:
Exception

testNextNoCheckState

public void testNextNoCheckState()
                          throws Exception
Walk through all of the nodes and make sure the return value is correct as well as the current node of the tree. Continue until the walker runs out of nodes. Sets the checkState property to false so all of the nodes will be walked.

Throws:
Exception

testReset

public void testReset()
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.



Copyright © 2012 The Apache Software Foundation. All Rights Reserved.