gshute.util
Class DispenserTester

java.lang.Object
  |
  +--gshute.ioutil.Tester
        |
        +--gshute.util.DispenserTester

public class DispenserTester
extends Tester

The DispenserTester class provides a main() method for testing all implementations of the Dispenser interface.


Field Summary
protected  Dispenser theDispenser
          theDispenser is the Dispenser that is being tested by this DispenserTester.
 
Fields inherited from class gshute.ioutil.Tester
commandStream, commandTable, prompt
 
Constructor Summary
DispenserTester()
           
 
Method Summary
 void addCommands()
          addCommands() adds testing commands to the command table.
static void main(java.lang.String[] args)
          If this program is executed with no command line argument then it executes commands entered from the terminal.
 
Methods inherited from class gshute.ioutil.Tester
doCommands, openStream, startInteractive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theDispenser

protected Dispenser theDispenser
theDispenser is the Dispenser that is being tested by this DispenserTester.
Constructor Detail

DispenserTester

public DispenserTester()
Method Detail

addCommands

public void addCommands()
addCommands() adds testing commands to the command table.
Overrides:
addCommands in class Tester

main

public static void main(java.lang.String[] args)
                 throws java.io.FileNotFoundException,
                        java.io.IOException
If this program is executed with no command line argument then it executes commands entered from the terminal. If this program is executed with a single command-line argument then that argument is interpreted as a file name. The program attempts to open the named file and execute the commands in it. If the open fails, or if there is more than one command-line argument, then the program terminates with an error message.