public class ServletTest
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.ResourceBundle |
CONFIG
Access the ResourceBundle containing configuration parameters.
|
Constructor and Description |
---|
ServletTest() |
Modifier and Type | Method and Description |
---|---|
void |
closeSimulation()
Test the ability to close an existing simulation request and to ensure
that the simulation is removed from the server.
|
void |
openSimulation()
Test the ability to create a new simulation request and to ensure that
a non-null ticket is returned, the returned ticket has an id, the number
of simulations stored has increased by one, and the simulation is in Idle
state.
|
void |
pauseAndResumeSimulation()
Test the ability to pause and resume a newly created and started simulation request
and to ensure that the state of the execution changed to paused and back.
|
void |
setUp()
Set up the initial singleton reference and Hessian proxy factory
that will be used within the JUnit test cases.
|
void |
shutdown()
Call the shutdown() method on the singleton and destroy all
references to it.
|
void |
startSimulation()
Test the ability to start a newly created simulation request and to ensure that
the state of the execution changed to preinitialize and iterating.
|
void |
stopSimulation()
Test the ability to stop an already iterating simulation request and to ensure
that the state of the execution changed to idle.
|
public static final java.util.ResourceBundle CONFIG
public void setUp() throws java.lang.Exception
java.lang.Exception
- If there is an error creating the Hessian proxy.public void openSimulation() throws java.lang.Exception
java.lang.Exception
- If there is an problem opening the model URL or
communicating with the command servlet.public void startSimulation() throws java.lang.Exception
java.lang.Exception
- If there is an problem opening the model URL, starting the
simulation, or communicating with the command servlet.public void pauseAndResumeSimulation() throws java.lang.Exception
java.lang.Exception
- If there is an problem opening the model URL, starting, pausing,
or resuming the simulation, or communicating with the command servlet.public void stopSimulation() throws java.lang.Exception
java.lang.Exception
- If there is an problem opening the model URL, starting the
simulation, stopping it, or communicating with the command servlet.public void closeSimulation() throws java.lang.Exception
java.lang.Exception
- If there is an problem opening the model URL, starting the
simulation, closing it, or communicating with the command servlet.public void shutdown() throws java.lang.Exception
java.lang.Exception
- If there was an error shutting down the broker or
servlet.