avignon
Class ScriptedTests

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byavignon.ScriptedTests
All Implemented Interfaces:
junit.framework.Test

public class ScriptedTests
extends junit.framework.TestCase

junit.framework.TestCase that runs Avignon scripts through JUnit.

Since:
1.0

Constructor Summary
ScriptedTests(java.lang.String name)
          Constructor that JUnit uses to run a particular test script.
 
Method Summary
 boolean equals(java.lang.Object value)
          Determines if this test instance is "equal" to something else.
 void executeTestScript()
          Executes the script that the class was constructed with.
 java.lang.String getName()
          Determines the name of the test represented by this instance.
 AvignonTestState getState()
          Used to determine the AvignonTestState being used to run the test associated with this instance.
protected  ScriptProcessor newScriptProcessor(AvignonTestState state)
          Factory method for making new ScriptProcessors to use during testing.
static junit.framework.Test suite()
          Standard JUnit suite method.
 java.lang.String toString()
          Represents the test as a string.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, run, run, runBare, runTest, setName, setUp, tearDown
 
Methods inherited from class junit.framework.Assert
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ScriptedTests

public ScriptedTests(java.lang.String name)
Constructor that JUnit uses to run a particular test script.

Parameters:
name - File name of the script to be executed relative to the ScriptRoot property.
Method Detail

toString

public java.lang.String toString()
Represents the test as a string.

Returns:
The name of the individual test to be run.

getName

public java.lang.String getName()
Determines the name of the test represented by this instance.

Returns:
The name of the individual test to be run.

suite

public static junit.framework.Test suite()
Standard JUnit suite method.

Returns:
The suite of tests consisting of all the files in the directory specified by the ScriptRoot property that end in "TestSuite.xml".

equals

public boolean equals(java.lang.Object value)
Determines if this test instance is "equal" to something else. The test is equal to the other object if the name of the test is equal to the string value of the other object.

Parameters:
value - The object to compare against.
Returns:
True if the value equals this instance.

executeTestScript

public void executeTestScript()
Executes the script that the class was constructed with.


newScriptProcessor

protected ScriptProcessor newScriptProcessor(AvignonTestState state)
Factory method for making new ScriptProcessors to use during testing.

Parameters:
state - The AvignonTestState to use during test execution.
Returns:
The shunted ScriptProcessor if any or a new instance of a ScriptProcessor if none has been shunted.

getState

public AvignonTestState getState()
Used to determine the AvignonTestState being used to run the test associated with this instance. (Used for unit testing.)

Returns:
The AvignonTestState being used for the current test.

SourceForge.net Logo