org.apache.james.mpt
Class Runner

java.lang.Object
  extended by org.apache.james.mpt.Runner

public class Runner
extends java.lang.Object

Runs protocol scripts.


Constructor Summary
Runner()
           
 
Method Summary
 void continueAfterFailure()
           
 ProtocolInteractor getPostElements()
          Gets protocol session run after test.
 ProtocolInteractor getPreElements()
          Gets protocol session run before test.
 ProtocolInteractor getTestElements()
          Gets protocol session run on test.
 void runSessions(SessionFactory factory)
          Runs the pre,test and post protocol sessions against a local copy of the server.
 java.lang.String toString()
          Constructs a String with all attributes in name = value format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Runner

public Runner()
Method Detail

continueAfterFailure

public void continueAfterFailure()

getPostElements

public ProtocolInteractor getPostElements()
Gets protocol session run after test.

Returns:
not null

getPreElements

public ProtocolInteractor getPreElements()
Gets protocol session run before test.

Returns:
not null

getTestElements

public ProtocolInteractor getTestElements()
Gets protocol session run on test.

Returns:
not null

runSessions

public void runSessions(SessionFactory factory)
                 throws java.lang.Exception

Runs the pre,test and post protocol sessions against a local copy of the server. This does not require that James be running, and is useful for rapid development and debugging.

Instead of sending requests to a socket connected to a running instance of James, this method uses the HostSystem to simplify testing. One mock instance is required per protocol session/connection.

Throws:
java.lang.Exception

toString

public java.lang.String toString()
Constructs a String with all attributes in name = value format.

Overrides:
toString in class java.lang.Object
Returns:
a String representation of this object.


Copyright © 2008-2009 The Apache Software Foundation. All Rights Reserved.