avignon
Class ScriptProcessor

java.lang.Object
  extended byjunit.framework.Assert
      extended byavignon.ScriptProcessor

public class ScriptProcessor
extends junit.framework.Assert

Used to execute an actual test script.


Constructor Summary
protected ScriptProcessor()
          Protected constructor to be used be subclasses.
 
Method Summary
 void executeTestScript(java.lang.String name, org.xml.sax.InputSource script)
          Executes a test script.
 AvignonTestState getState()
          Used in unit testing to make sure that the ScriptProcessor has the correct AvignonTestState.
static ScriptProcessor newProcessor(AvignonTestState state)
          Factory method for creating a script processor instance.
static void shunt(ScriptProcessor processor)
          Sets the ScriptProcessor to be returned by the newProcessor factory method.
 
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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScriptProcessor

protected ScriptProcessor()
Protected constructor to be used be subclasses. Used for unit testing.

Method Detail

shunt

public static void shunt(ScriptProcessor processor)
Sets the ScriptProcessor to be returned by the newProcessor factory method. Used for unit testing.

Parameters:
processor - The ScriptProcessor to use.

newProcessor

public static ScriptProcessor newProcessor(AvignonTestState state)
Factory method for creating a script processor instance.

Parameters:
state - The AvignonTestState to be used while processing any scripts.
Returns:
A new ScriptProcessor instance of none has been shunted or the one shunted instance if it exists.

executeTestScript

public void executeTestScript(java.lang.String name,
                              org.xml.sax.InputSource script)
Executes a test script.

Parameters:
name - Identifier for the script. Used when reporting parsing or other system errors.
script - InputSource for parsing the script.

getState

public AvignonTestState getState()
Used in unit testing to make sure that the ScriptProcessor has the correct AvignonTestState.

Returns:
The AvignonTestState associated with this ScriptProcessor.

SourceForge.net Logo