ps2.test
Class DrivingRouteFormatterTest

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

public class DrivingRouteFormatterTest
extends TestCase

Unit tests for the DrivingRouteFormatter class.


Constructor Summary
DrivingRouteFormatterTest()
           
 
Method Summary
protected  void setUp()
           
 void testDistance()
          Test rounding distance, especially if rounded up to 0.1 and rounded down to 0.0.
 void testLongRoute()
          Long route with no repeats.
 void testRepeatedRoute()
          Just like long route, but different makeup of geosegements.
 void testRepeatedSegment()
          Two step route with one geo feature.
 void testShortDirections()
          Test simple directions with one distance and one origHeading.
 void testTurning()
          Test turning directions with different origHeadings.
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DrivingRouteFormatterTest

public DrivingRouteFormatterTest()
Method Detail

setUp

protected void setUp()
Overrides:
setUp in class TestCase

testShortDirections

public void testShortDirections()
                         throws IOException
Test simple directions with one distance and one origHeading.

Throws:
IOException

testTurning

public void testTurning()
Test turning directions with different origHeadings.


testDistance

public void testDistance()
Test rounding distance, especially if rounded up to 0.1 and rounded down to 0.0. Should compute time before rounding.


testRepeatedSegment

public void testRepeatedSegment()
Two step route with one geo feature.


testLongRoute

public void testLongRoute()
Long route with no repeats.


testRepeatedRoute

public void testRepeatedRoute()
Just like long route, but different makeup of geosegements.