ps6.test
Class TestRecord

java.lang.Object
  extended by ps6.test.TestRecord

public final class TestRecord
extends Object

A test record is a fairly simple record type to hold a query and its expected results


Nested Class Summary
static class TestRecord.TestType
           
 
Field Summary
 String[] directions
          sequence of directions lines expected from getDirections, or null if we expect not to find any directions.
 Address end
          destination of the query
 String errorMessage
          The error message.
 double length
          expected result of getLength(), or NaN if we expect not to find and directions
 Address start
          start of the query
 String tripLength
          The trip length or trip time that appear at the end of the directions.
 TestRecord.TestType type
          the type of this test
 
Constructor Summary
TestRecord(TestRecord.TestType type, Address start, Address end, String[] directions, String tripLength, double length, String errorMessage)
           
 
Method Summary
 String getDirectionType()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

start

public final Address start
start of the query


end

public final Address end
destination of the query


type

public TestRecord.TestType type
the type of this test


directions

public final String[] directions
sequence of directions lines expected from getDirections, or null if we expect not to find any directions. the elements must not contain newlines at the end.


tripLength

public final String tripLength
The trip length or trip time that appear at the end of the directions.


length

public final double length
expected result of getLength(), or NaN if we expect not to find and directions


errorMessage

public final String errorMessage
The error message. It could be an invalid address, invalid direciont type, or a no path message.

Constructor Detail

TestRecord

public TestRecord(TestRecord.TestType type,
                  Address start,
                  Address end,
                  String[] directions,
                  String tripLength,
                  double length,
                  String errorMessage)
Method Detail

getDirectionType

public String getDirectionType()