javautils.graph
Class GraphsTest

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--javautils.graph.GraphsTest
All Implemented Interfaces:
junit.framework.Test, TestGraphConstants

public class GraphsTest
extends junit.framework.TestCase
implements TestGraphConstants

A [JUnit] test for Graphs.


Field Summary
 
Fields inherited from interface javautils.graph.testing.TestGraphConstants
ABCDEFGH_GRAPH, ABCDEFGHIJ_GRAPH, CLOTHING_GRAPH, RSTUVWXY_GRAPH, STUVWXYZ_GRAPH, UVWXYZ_GRAPH
 
Constructor Summary
GraphsTest()
           
 
Method Summary
 void testAsString()
          Tests that the Graphs.asString(javautils.graph.adt.Graph)-method gives correct results on the TestGraphConstants.CLOTHING_GRAPH.
 void testConnectedComponentsOnCLOTHING()
          Tests that the Graphs.connectedComponents(javautils.graph.adt.Graph)-method appears to return the correct result on the TestGraphConstants.CLOTHING_GRAPH-graph, which consists of two components.
 void testConnectedComponentsOnUVWXYZ()
          Tests that the Graphs.connectedComponents(javautils.graph.adt.Graph)-method returns the correct result on the TestGraphConstants.UVWXYZ_GRAPH-graph, which is a connected graph.
 void testEdgesOnABCDEFGHIJ()
          Tests that the Graphs.edges(javautils.graph.adt.Graph)-method returns the correct result on the TestGraphConstants.ABCDEFGHIJ_GRAPH-graph.
 void testRestrictedToNodesOnABCDEFGH()
          Tests that the Graphs.restrictedToNodes(javautils.graph.adt.Graph, java.util.Iterator)-method returns the correct result on the TestGraphConstants.ABCDEFGH_GRAPH-graph when restricted to nodes {a,b,c,d}.
 void testStronglyConnectedComponentsOnABCDEFGH()
          Tests that the Graphs.stronglyConnectedComponents(javautils.graph.adt.Graph)-method returns the correct result on the TestGraphConstants.ABCDEFGH_GRAPH-graph.
 void testStronglyConnectedComponentsOnABCDEFGHIJ()
          Tests that the Graphs.stronglyConnectedComponents(javautils.graph.adt.Graph)-method returns the correct result on the TestGraphConstants.ABCDEFGHIJ_GRAPH-graph.
 void testTransitiveIrreflexiveClosureOnCLOTHING()
          Tests that the Graphs.transitiveIrreflexiveClosure(javautils.graph.adt.Graph)-method returns the correct result on the TestGraphConstants.CLOTHING_GRAPH-graph.
 void testTransitiveIrreflexiveClosureOnUVWXYZ()
          Tests that the Graphs.transitiveIrreflexiveClosure(javautils.graph.adt.Graph)-method returns the correct result on the TestGraphConstants.UVWXYZ_GRAPH-graph, which is a cyclic graph containing a self-edge.
 void testTransposedOnUVWXYZ()
          Tests that the Graphs.transposed(javautils.graph.adt.AugmentedGraph)-method returns a graph with specified properties on the TestGraphConstants.UVWXYZ_GRAPH-graph.
 void testUndirectedUVWXYZ()
          Tests that the Graphs.undirected(javautils.graph.adt.Graph)-method returns correct results on the TestGraphConstants.UVWXYZ_GRAPH-graph.
 
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

GraphsTest

public GraphsTest()
Method Detail

testAsString

public void testAsString()

Tests that the Graphs.asString(javautils.graph.adt.Graph)-method gives correct results on the TestGraphConstants.CLOTHING_GRAPH.


testTransposedOnUVWXYZ

public void testTransposedOnUVWXYZ()

Tests that the Graphs.transposed(javautils.graph.adt.AugmentedGraph)-method returns a graph with specified properties on the TestGraphConstants.UVWXYZ_GRAPH-graph.


testUndirectedUVWXYZ

public void testUndirectedUVWXYZ()

Tests that the Graphs.undirected(javautils.graph.adt.Graph)-method returns correct results on the TestGraphConstants.UVWXYZ_GRAPH-graph.


testConnectedComponentsOnUVWXYZ

public void testConnectedComponentsOnUVWXYZ()

Tests that the Graphs.connectedComponents(javautils.graph.adt.Graph)-method returns the correct result on the TestGraphConstants.UVWXYZ_GRAPH-graph, which is a connected graph.


testConnectedComponentsOnCLOTHING

public void testConnectedComponentsOnCLOTHING()

Tests that the Graphs.connectedComponents(javautils.graph.adt.Graph)-method appears to return the correct result on the TestGraphConstants.CLOTHING_GRAPH-graph, which consists of two components.


testStronglyConnectedComponentsOnABCDEFGH

public void testStronglyConnectedComponentsOnABCDEFGH()

Tests that the Graphs.stronglyConnectedComponents(javautils.graph.adt.Graph)-method returns the correct result on the TestGraphConstants.ABCDEFGH_GRAPH-graph.


testStronglyConnectedComponentsOnABCDEFGHIJ

public void testStronglyConnectedComponentsOnABCDEFGHIJ()

Tests that the Graphs.stronglyConnectedComponents(javautils.graph.adt.Graph)-method returns the correct result on the TestGraphConstants.ABCDEFGHIJ_GRAPH-graph.


testRestrictedToNodesOnABCDEFGH

public void testRestrictedToNodesOnABCDEFGH()

Tests that the Graphs.restrictedToNodes(javautils.graph.adt.Graph, java.util.Iterator)-method returns the correct result on the TestGraphConstants.ABCDEFGH_GRAPH-graph when restricted to nodes {a,b,c,d}.


testTransitiveIrreflexiveClosureOnCLOTHING

public void testTransitiveIrreflexiveClosureOnCLOTHING()

Tests that the Graphs.transitiveIrreflexiveClosure(javautils.graph.adt.Graph)-method returns the correct result on the TestGraphConstants.CLOTHING_GRAPH-graph.


testTransitiveIrreflexiveClosureOnUVWXYZ

public void testTransitiveIrreflexiveClosureOnUVWXYZ()

Tests that the Graphs.transitiveIrreflexiveClosure(javautils.graph.adt.Graph)-method returns the correct result on the TestGraphConstants.UVWXYZ_GRAPH-graph, which is a cyclic graph containing a self-edge.


testEdgesOnABCDEFGHIJ

public void testEdgesOnABCDEFGHIJ()

Tests that the Graphs.edges(javautils.graph.adt.Graph)-method returns the correct result on the TestGraphConstants.ABCDEFGHIJ_GRAPH-graph.