reservations
Class FlightTest

java.lang.Object
  |
  +--reservations.FlightTest

public class FlightTest
extends java.lang.Object

Provides a test of an implementation of a class that implements the Flight interface provided the implementation class has a constructor that takes an Itinerary object, as required.

Version:
1.00
Author:
Jonathan Doughty

Constructor Summary
FlightTest(java.lang.String className)
          Constructs a new FlighTest object to test the named class implementing the Flight interface.
 
Method Summary
static void main(java.lang.String[] args)
          Tests the creation of objects implementing the Flight interface.
 void test()
          Invokes the testing mechanism to call the Flight implemntation constructor for each of a series of Itinerary objects.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlightTest

public FlightTest(java.lang.String className)
Constructs a new FlighTest object to test the named class implementing the Flight interface.

Parameters:
className - name of class that implements Flight interface
Method Detail

test

public void test()
Invokes the testing mechanism to call the Flight implemntation constructor for each of a series of Itinerary objects. If the Flight object is sucessfully constructed, invokes the methods of the Flight interface on that object.


main

public static void main(java.lang.String[] args)
Tests the creation of objects implementing the Flight interface.
 usage: reservations.FlightTest name_of_flight_class
 
Dynamically loads the class named as a command line argument and checks that it implements the necessary interface and has a constructor taking an Itinerary object.

See Also:
Flight, Itinerary