JNodeOS v1.2.0 API

edu.utah.janos.tests
Class Tester

java.lang.Object
  |
  +--edu.utah.janos.tests.Tester
Direct Known Subclasses:
AddressFactoryTester, AddressTester, BufferHandleTester, ClassInstantiationKeyTester, CredentialsTester, DemultiplexKeyTester, FlowClassLoaderTester, InChannelTester, NodeOSTester, OutChannelTester, SemaphoreTester, ThreadPoolTester

public abstract class Tester
extends java.lang.Object

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


Field Summary
static int ENV_DEBUG
           
static int ENV_EXPOSED
           
static java.lang.String[] ENV_NAMES
          String names for the environment identifiers
static int ENV_NDEBUG
           
static int ENV_NONE
          Flags that are used to encode the build environment
 
Constructor Summary
Tester()
           
 
Method Summary
protected  boolean enterSection(int environment, java.lang.String desc)
          Used to indicate that the tester class is entering a new section of testing.
 java.lang.String getSection()
          Get description of the current section
protected  void test(boolean value)
          Test a boolean value and throw a TestFailedException if it was false
protected  void test(java.lang.String name, boolean value)
          Test a boolean value and throw a TestFailedException if it was false
static void testClass(java.lang.Class cl)
          Test the given class object
static void testClass(java.lang.String name)
          Overloaded method
abstract  void testUnit()
          Run the actual tests
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ENV_NONE

public static final int ENV_NONE
Flags that are used to encode the build environment

ENV_DEBUG

public static final int ENV_DEBUG

ENV_NDEBUG

public static final int ENV_NDEBUG

ENV_EXPOSED

public static final int ENV_EXPOSED

ENV_NAMES

public static final java.lang.String[] ENV_NAMES
String names for the environment identifiers
Constructor Detail

Tester

public Tester()
Method Detail

enterSection

protected boolean enterSection(int environment,
                               java.lang.String desc)
Used to indicate that the tester class is entering a new section of testing.
Parameters:
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

public java.lang.String getSection()
Get description of the current section

test

protected void test(boolean value)
             throws TestFailedException
Test a boolean value and throw a TestFailedException if it was false

test

protected void test(java.lang.String name,
                    boolean value)
             throws TestFailedException
Test a boolean value and throw a TestFailedException if it was false

testUnit

public abstract void testUnit()
                       throws TestFailedException
Run the actual tests

testClass

public static void testClass(java.lang.Class cl)
Test the given class object
Parameters:
cl - A subclass of Tester that implements testUnit

testClass

public static void testClass(java.lang.String name)
Overloaded method
Parameters:
name - The name of the class to be tested

JNodeOS v1.2.0 API

This documentation is Copyright (C) 1998-2002 The University of Utah. All Rights Reserved. See the file LICENSE for distribution terms.
Documentation, software, and mailing list archives for Janos can be found at the Janos Project web site: http://www.cs.utah.edu/flux/janos/
Generated on Mar 17, 2002