diva.pod.test
Class LightweightGraphTest

java.lang.Object
  extended by diva.util.jester.TestSuite
      extended by diva.pod.test.LightweightGraphTest

public class LightweightGraphTest
extends TestSuite

A test suite for the LightweightGraph class.

Version:
$Revision: 1.4 $
Author:
John Reekie

Nested Class Summary
static interface LightweightGraphTest.GraphFactory
          The graph factory interface
static class LightweightGraphTest.LightweightGraphFactory
          The factory for the LightweightGraph class
 class LightweightGraphTest.TestGraph1
          A test case containing the following test graph, where the labels are the 'name' attribute of the nodes and edges:
 class LightweightGraphTest.TestGraph2
          A test case containing the following test graph, where the labels are the 'name' attribute of the nodes and edges and "N" is a parent node.
 
Constructor Summary
LightweightGraphTest(TestHarness harness, LightweightGraphTest.GraphFactory factory)
          Constructor
 
Method Summary
 String iterateNames(Iterator i)
          Given an iterator over PropertyContainers, return the string consisting of the concatenated "name" attributes
static void main(String[] argv)
          Create a default test harness and run all tests on it.
 void runSuite()
          runSuite()
 void testBig()
          Test a large (64 knode) graph
 void testEmpty()
          Perform tests on an empty graph
 void testHierarchy()
          Create test graph r and check properties of a hierarchical graph
 void testInOut()
          Create test graph 1 and check that in and out edges are iterated properly
 void testNodesEdges()
          Create test graph 1 and check that the node and edge iterators work correctly.
 void testStarConnected()
          Test a star-connected graph
 void testSuccPred()
          Create test graph 1 and check that successor and predecessor nodes are iterated properly
 
Methods inherited from class diva.util.jester.TestSuite
getFactory, getTestHarness, run, runAll, runTestCase, setFactory, setTestHarness
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LightweightGraphTest

public LightweightGraphTest(TestHarness harness,
                            LightweightGraphTest.GraphFactory factory)
Constructor

Method Detail

runSuite

public void runSuite()
runSuite()

Specified by:
runSuite in class TestSuite

main

public static void main(String[] argv)
Create a default test harness and run all tests on it.


testEmpty

public void testEmpty()
Perform tests on an empty graph


testStarConnected

public void testStarConnected()
Test a star-connected graph


testBig

public void testBig()
Test a large (64 knode) graph


testNodesEdges

public void testNodesEdges()
Create test graph 1 and check that the node and edge iterators work correctly.


testSuccPred

public void testSuccPred()
Create test graph 1 and check that successor and predecessor nodes are iterated properly


testInOut

public void testInOut()
Create test graph 1 and check that in and out edges are iterated properly


testHierarchy

public void testHierarchy()
Create test graph r and check properties of a hierarchical graph


iterateNames

public String iterateNames(Iterator i)
Given an iterator over PropertyContainers, return the string consisting of the concatenated "name" attributes



Copyright © 2015 Central Laboratory of the Research Councils. All Rights Reserved.