ioutil
Class Tester

java.lang.Object
  |
  +--ioutil.Tester
Direct Known Subclasses:
CircularListTester, FormattingTester

public class Tester
extends java.lang.Object

Class Tester is a base class for line-oriented, command-driven, interactive and batch testing.


Constructor Summary
Tester()
          Tester() returns a new Tester.
 
Method Summary
 void addCommands()
          addCommands() adds testing commands to the command table.
 void doCommands()
          doCommands() executes commands from the command stream.
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.
 void openStream(java.lang.String[] args)
          openStream(args) checks the command line for a correct number of arguments and opens a source file if specified.
 void startInteractive()
          startInteractive() prints messages to the interactive user describing how to use the program.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Tester

public Tester()
Tester() returns a new Tester.
Method Detail

addCommands

public void addCommands()
addCommands() adds testing commands to the command table.

startInteractive

public void startInteractive()
startInteractive() prints messages to the interactive user describing how to use the program.

openStream

public void openStream(java.lang.String[] args)
                throws java.io.FileNotFoundException,
                       java.io.IOException
openStream(args) checks the command line for a correct number of arguments and opens a source file if specified.

doCommands

public void doCommands()
                throws java.io.IOException
doCommands() executes commands from the command stream.

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.