|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
test.calculation.BuildTreeTest
public class BuildTreeTest
The test class of the calcultaion.BuildTree.
Field Summary | |
---|---|
(package private) calculation.BuildTree |
buildTree
BuildTree. |
(package private) calculation.BuildTree |
buildTree2
Another BuildTee. |
(package private) general.DataCollection |
dataCollection
DataCollection. |
private calculation.Vertex[][] |
graph
Graph for testing. |
(package private) calculation.Graph |
graph2
Another Graph for testing. |
private static int |
MAP_HEIGHT
Height of the test graph. |
private static int |
MAP_WIDTH
Width of the test graph. |
private calculation.Vertex |
nullVertex
Nullvertex. |
(package private) calculation.Vertex |
vertex
Vertex. |
Constructor Summary | |
---|---|
BuildTreeTest()
|
Method Summary | |
---|---|
private java.lang.String |
pathString(java.util.ArrayList<calculation.Vertex> path)
Creates a string which shows which vertexes belong to a given path. |
void |
setUp()
Creates MAP_WIDTH*MAP_HEIGHT-sized graph where some vertexes are not available. |
void |
testAStar()
Tests if aStar finds correct paths in different situations in the test graph. |
void |
testCalculate()
Tests method calculate and treeRecursion. |
void |
testCalculatePath()
Tests method calculatePath. |
void |
testHalfTable()
Tests method halfTable. |
void |
testPathLength()
Test for pathLength(). |
void |
testSetSafetyDistance()
Tests method setSafetyDistance. |
void |
testSetSlidingSafetyDistance()
Tests method setSlidingSafetyDistance. |
void |
testTestSide()
Tests method testSide. |
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 |
Field Detail |
---|
calculation.BuildTree buildTree
calculation.BuildTree buildTree2
general.DataCollection dataCollection
private calculation.Vertex[][] graph
calculation.Graph graph2
private static final int MAP_HEIGHT
private static final int MAP_WIDTH
private calculation.Vertex nullVertex
calculation.Vertex vertex
Constructor Detail |
---|
public BuildTreeTest()
Method Detail |
---|
private java.lang.String pathString(java.util.ArrayList<calculation.Vertex> path)
path
- the path whose String representation is wanted
public void setUp() throws java.lang.Exception
setUp
in class junit.framework.TestCase
java.lang.Exception
- if something bad happens.public final void testAStar()
public void testCalculate()
public void testCalculatePath()
public void testHalfTable()
public final void testPathLength()
public void testSetSafetyDistance()
public void testSetSlidingSafetyDistance()
public void testTestSide()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |