|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTestCase
com.savarese.algorithms.graph.SingleSourceShortestPathFinderTestCase
public abstract class SingleSourceShortestPathFinderTestCase
SingleSourceShortestPathFinderTestCase tests implementations of the SingleSourcePathFinder interface that find shortest paths.
Nested Class Summary | |
---|---|
static class |
SingleSourceShortestPathFinderTestCase.GalacticMap
A convenience class acting as a typedef for a particular graph type used in tests. |
static class |
SingleSourceShortestPathFinderTestCase.HyperspaceTransit
A convenience class acting as a typedef for a particular edge type used in tests. |
Field Summary | |
---|---|
protected SingleSourceShortestPathFinderTestCase.GalacticMap |
_map_
The graph used for testing, initialized by _createMapFixture_() . |
protected com.savarese.algorithms.graph.SingleSourcePathFinder<java.lang.String,java.lang.Integer,SingleSourceShortestPathFinderTestCase.HyperspaceTransit> |
_pathFinder_
A SingleSourcePathFinder fixture initalized in setUp() by
calling _newPathFinderFixture_() . |
static java.lang.String |
Alderaan
|
static java.lang.String |
Bespin
|
static java.lang.String |
Coruscant
|
static java.lang.String |
Dagobah
|
static java.lang.String |
Earth
|
static java.lang.String |
Hoth
|
static java.lang.String |
Tatooine
|
static java.lang.String |
Yavin
|
Constructor Summary | |
---|---|
SingleSourceShortestPathFinderTestCase()
|
Method Summary | |
---|---|
protected SingleSourceShortestPathFinderTestCase.GalacticMap |
_createMapFixture_()
Creates the GalacticMap used by tests. |
protected abstract com.savarese.algorithms.graph.SingleSourcePathFinder<java.lang.String,java.lang.Integer,SingleSourceShortestPathFinderTestCase.HyperspaceTransit> |
_newPathFinderFixture_()
Creates a new SingleSourcePathFinder instance for testing. |
protected void |
setUp()
Instantiates _pathFinder_ and _map_ to use as
fixtures for tests. |
protected void |
tearDown()
Clears the GalacticMap fixture, removing all its contents so that a subsequent test will not be affected by the previous one. |
void |
testFindPath()
Tests the findPath method by verifying a number of shortest paths. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String Coruscant
public static final java.lang.String Alderaan
public static final java.lang.String Tatooine
public static final java.lang.String Yavin
public static final java.lang.String Hoth
public static final java.lang.String Dagobah
public static final java.lang.String Bespin
public static final java.lang.String Earth
protected com.savarese.algorithms.graph.SingleSourcePathFinder<java.lang.String,java.lang.Integer,SingleSourceShortestPathFinderTestCase.HyperspaceTransit> _pathFinder_
setUp()
by
calling _newPathFinderFixture_()
.
protected SingleSourceShortestPathFinderTestCase.GalacticMap _map_
_createMapFixture_()
.
Constructor Detail |
---|
public SingleSourceShortestPathFinderTestCase()
Method Detail |
---|
protected abstract com.savarese.algorithms.graph.SingleSourcePathFinder<java.lang.String,java.lang.Integer,SingleSourceShortestPathFinderTestCase.HyperspaceTransit> _newPathFinderFixture_()
protected SingleSourceShortestPathFinderTestCase.GalacticMap _createMapFixture_()
protected void setUp()
_pathFinder_
and _map_
to use as
fixtures for tests.
protected void tearDown()
public void testFindPath()
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |