All Packages  This Package  Class Hierarchy  Class Search  Index

Class edu.utah.janos.tests.Tester
java.lang.Object
   |
   +----edu.utah.janos.tests.Tester

  Summary

public abstract class  Tester
     extends java.lang.Object
{
          // Fields 7
     public static final int ENV_DEBUG;
     public static final int ENV_EXPOSED;
     public static final String[] ENV_NAMES;
     public static final int ENV_NDEBUG;
     public static final int ENV_NONE;
     private String section;
     static boolean verbose;

          // Constructors 1
     public Tester();

          // Methods 8
     public static void testClass(Class);
     public static void testClass(String);

     protected boolean enterSection(int, String);
     public String getSection();
     protected void test(boolean) throws TestFailedException;
     protected void test(String, boolean) throws TestFailedException;
     public abstract void testUnit() throws TestFailedException;
     private boolean verifyEnvironment(int, String);
}

The Tester class is used as a base for a class which does testing.


  Cross Reference

Extended By:
ANEPDemultiplexKeyTester, ANTSRDemultiplexKeyTester, CapsuleTester, CoreTester, ProtocolTester, AddressFactoryTester, AddressTester, BufferHandleTester, ClassInstantiationKeyTester, CommQueueTester, CommSpaceElementTester, CommSpaceHandleTester, CredentialsTester, DemultiplexKeyTester, FlowClassLoaderTester, InChannelTester, NodeOSTester, OutChannelTester, SemaphoreTester, ThreadPoolTester





  Fields

· ENV_NONE

Summary  |  Top
   public static final int ENV_NONE

Flags that are used to encode the build environment


· ENV_DEBUG

Summary  |  Top
   public static final int ENV_DEBUG


· ENV_NDEBUG

Summary  |  Top
   public static final int ENV_NDEBUG


· ENV_EXPOSED

Summary  |  Top
   public static final int ENV_EXPOSED


· ENV_NAMES

Summary  |  Top
   public static final String[] ENV_NAMES

String names for the environment identifiers


· verbose

Summary  |  Top
   static boolean verbose

Generate verbose output


· section

Summary  |  Top
   private String section

The name of the current section we're testing


  Constructors

· Tester

Summary  |  Top

   public Tester() 

Default constructor



  Methods

· verifyEnvironment

Summary  |  Top
   private boolean verifyEnvironment(int required, 
                                     String mesg) 

Verifies that the class is running in the required environment and prints out a warning if it isn't.

Parameter Description
required Bitmask indicating the required environment
mesg The section that is being tested

Returns:
True if the required environment is available, false otherwise


· enterSection

Summary  |  Top
   protected boolean enterSection(int environment, 
                                  String desc) 

Used to indicate that the tester class is entering a new section of testing.

Parameter Description
environment The required environment for this section
desc A string naming/describing this section

Returns:
True if the requirements for the environment were met


· getSection

Summary  |  Top
   public String getSection() 

Get description of the current section



· test

Summary  |  Top
   protected void test(boolean value)  throws TestFailedException

Test a boolean value and throw a TestFailedException if it was false



· test

Summary  |  Top
   protected void test(String name, 
                       boolean value)  throws TestFailedException

Test a boolean value and throw a TestFailedException if it was false



· testUnit

Summary  |  Top
   public abstract void testUnit()  throws TestFailedException

Run the actual tests



· testClass

Summary  |  Top
   public static void testClass(Class cl) 

Test the given class object

Parameter Description
cl A subclass of Tester that implements testUnit



· testClass

Summary  |  Top
   public static void testClass(String name) 

Overloaded method

Parameter Description
name The name of the class to be tested



All Packages  This Package  Class Hierarchy  Class Search  Index
Freshly brewed Java API Documentation automatically generated with polardoc Version 1.0.7