test.airspace
Class PlaneTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by test.airspace.PlaneTest
All Implemented Interfaces:
junit.framework.Test

public class PlaneTest
extends junit.framework.TestCase

Test class for the class Plane.

Version:
1
Author:
Potkuri-group

Field Summary
(package private)  java.util.ArrayList<calculation.Vertex>[] arcPoints
          Arcpoints.
(package private)  calculation.BuildTree buildTree
          BuildTree.
private  calculation.Vertex[][] graph
          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)  general.Parameters parameters
          Parameters.
(package private)  airspace.Plane plane
          Plane.
(package private)  calculation.TreeNode root
          Root.
(package private)  calculation.TreeNode treeNode
          TreeNode.
(package private)  calculation.Vertex vertex
          Vertex.
 
Constructor Summary
PlaneTest()
           
 
Method Summary
 void setUp()
          A method that is called before every test method.
 void testAddToPath()
          Tests method addToPath().
 void testClearPath()
          Tests method clearPath().
 void testCompareTo()
          Tests compareTo().
 void testDistanceOfPoints()
          Tests method distanceOfPoints().
 void testDistanceToDoubleDouble()
          Tests method distanceTo(double targlat, double targlon).
 void testDistanceToPlane()
          Tests method distanceToPlane(Plane other).
 void testFly()
          Tests method fly().
 void testGetLat()
          Tests method getLat().
 void testGetLon()
          Tests method getLon().
 void testGetSafetyZone()
          Tests method getSafetyZone().
 void testIsOnArrivalTree()
          Tests method isOnArrivalTree().
 void testPlane()
          Tests the constructor.
 void testSetColorGetColor()
          Tests methods setColor() and getColor().
 void testSetCurrentTreeNodeGetCurrent()
          Tests methods setCurrentTreeNode() and getCurrentNode().
 void testSetDirGetDir()
          Tests methods setDir() and getDir().
 void testSetDistToAirport()
          Tests method setDistToAirport().
 void testSetLat()
          Tests method setLat().
 void testSetLon()
          Tests method setLon().
 void testSetPathGetPath()
          Tests methods getPath() and getPath().
 void testSetSpeedGetSpeed()
          Tests methods setSpeed() and getSpeed().
 void testToString()
          Tests method toString().
 
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

arcPoints

java.util.ArrayList<calculation.Vertex>[] arcPoints
Arcpoints.


buildTree

calculation.BuildTree buildTree
BuildTree.


graph

private calculation.Vertex[][] graph
Graph for testing.


MAP_HEIGHT

private static final int MAP_HEIGHT
Height of the test graph.

See Also:
Constant Field Values

MAP_WIDTH

private static final int MAP_WIDTH
Width of the test graph.

See Also:
Constant Field Values

nullVertex

private calculation.Vertex nullVertex
Nullvertex.


parameters

general.Parameters parameters
Parameters.


plane

airspace.Plane plane
Plane.


root

calculation.TreeNode root
Root.


treeNode

calculation.TreeNode treeNode
TreeNode.


vertex

calculation.Vertex vertex
Vertex.

Constructor Detail

PlaneTest

public PlaneTest()
Method Detail

setUp

public void setUp()
           throws java.lang.Exception
A method that is called before every test method.

Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception - if something bad happens.

testAddToPath

public void testAddToPath()
Tests method addToPath().


testClearPath

public void testClearPath()
Tests method clearPath().


testCompareTo

public void testCompareTo()
Tests compareTo().


testDistanceOfPoints

public void testDistanceOfPoints()
Tests method distanceOfPoints().


testDistanceToDoubleDouble

public void testDistanceToDoubleDouble()
Tests method distanceTo(double targlat, double targlon).


testDistanceToPlane

public void testDistanceToPlane()
Tests method distanceToPlane(Plane other).


testFly

public void testFly()
Tests method fly().


testGetLat

public void testGetLat()
Tests method getLat().


testGetLon

public void testGetLon()
Tests method getLon().


testGetSafetyZone

public void testGetSafetyZone()
Tests method getSafetyZone().


testIsOnArrivalTree

public void testIsOnArrivalTree()
Tests method isOnArrivalTree().


testPlane

public void testPlane()
Tests the constructor.


testSetColorGetColor

public void testSetColorGetColor()
Tests methods setColor() and getColor().


testSetCurrentTreeNodeGetCurrent

public void testSetCurrentTreeNodeGetCurrent()
Tests methods setCurrentTreeNode() and getCurrentNode().


testSetDirGetDir

public void testSetDirGetDir()
Tests methods setDir() and getDir().


testSetDistToAirport

public void testSetDistToAirport()
Tests method setDistToAirport().


testSetLat

public void testSetLat()
Tests method setLat().


testSetLon

public void testSetLon()
Tests method setLon().


testSetPathGetPath

public void testSetPathGetPath()
Tests methods getPath() and getPath().


testSetSpeedGetSpeed

public void testSetSpeedGetSpeed()
Tests methods setSpeed() and getSpeed().


testToString

public void testToString()
Tests method toString().