ca.quine.jcommons.freemind.maputil.test
Class MapUtilsTest

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--ca.quine.jcommons.freemind.maputil.test.MapUtilsTest
All Implemented Interfaces:
Test

public class MapUtilsTest
extends TestCase

Code samples/test cases for the MapUtils Utility class. To run these, castor-1.0.3.jar, commons-logging-1.1.jar and xerces.jar (or xercesImpl.jar) are required on the classpath. See http://jcommons.sourceforge.net/ for download links.


Constructor Summary
MapUtilsTest()
           
 
Method Summary
 void testApplyBFS()
          Ensure that a BFS traversal happens in the right order.
 void testApplyDFSPostOrder()
          Ensure that a DFS post-order traversal happens in the right order.
 void testApplyDFSPreOrder()
          Ensure that a DFS pre-order traversal happens in the right order.
 void testCountAndCloseLargeNodes()
           
 void testMakeNodeAndGetNode()
           
 void testMindMapMarshalAsFile()
          Creates a mindmap with sample data and marshals it to a file.
 void testSearchContains()
           
 void testSearchExactMatch()
           
 void testSearchRegex()
           
 void testSortMap()
           
 void testSortMapWithNodeComparator()
           
 void testSortNode()
           
 void testSortNodeWithNodeComparator()
           
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MapUtilsTest

public MapUtilsTest()
Method Detail

testMindMapMarshalAsFile

public void testMindMapMarshalAsFile()
                              throws IOException,
                                     XMLException
Creates a mindmap with sample data and marshals it to a file. This example is more to show how to create a mindmap file than as an actual test case.

Throws:
IOException
XMLException

testMakeNodeAndGetNode

public void testMakeNodeAndGetNode()

testCountAndCloseLargeNodes

public void testCountAndCloseLargeNodes()

testSortMap

public void testSortMap()

testSortMapWithNodeComparator

public void testSortMapWithNodeComparator()

testSortNode

public void testSortNode()

testSortNodeWithNodeComparator

public void testSortNodeWithNodeComparator()

testApplyDFSPreOrder

public void testApplyDFSPreOrder()
Ensure that a DFS pre-order traversal happens in the right order.


testApplyDFSPostOrder

public void testApplyDFSPostOrder()
Ensure that a DFS post-order traversal happens in the right order.


testApplyBFS

public void testApplyBFS()
Ensure that a BFS traversal happens in the right order.


testSearchContains

public void testSearchContains()

testSearchExactMatch

public void testSearchExactMatch()

testSearchRegex

public void testSearchRegex()