Class ScenarioTestInfo
java.lang.Object
fr.fidorial.testing.ScenarioTestInfo
The running state of one
ScenarioTestInstance, ticked by the server test runner.- Since:
- 0.1.0
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionScenarioTestInfo(ScenarioTestInstance instance, World world, ScenarioTestPlayerFactory playerFactory) Prepares a test run. -
Method Summary
Modifier and TypeMethodDescriptionerror()Returns the failure of the test, ornullunless it failed.instance()Returns the test being run.booleanisDone()Returnstrueonce the test passed or failed.state()Returns the current state of the test.inttick()Returns the tick the test last ran at.voidtick(int currentTick) Advances the test: invokes the test method on the first call, then ticks its sequence until it completes, fails or times out.
-
Constructor Details
-
ScenarioTestInfo
public ScenarioTestInfo(ScenarioTestInstance instance, World world, ScenarioTestPlayerFactory playerFactory) Prepares a test run.- Parameters:
instance- the test to runworld- the world the test runs inplayerFactory- the factory of the mock players the test summons- Since:
- 0.1.0
-
-
Method Details
-
tick
public int tick()Returns the tick the test last ran at.- Returns:
- the tick the test last ran at
- Since:
- 0.1.0
-
state
Returns the current state of the test.- Returns:
- the current state of the test
- Since:
- 0.1.0
-
instance
Returns the test being run.- Returns:
- the test being run
- Since:
- 0.1.0
-
error
-
isDone
public boolean isDone()Returnstrueonce the test passed or failed.- Returns:
trueonce the test passed or failed- Since:
- 0.1.0
-
tick
public void tick(int currentTick) Advances the test: invokes the test method on the first call, then ticks its sequence until it completes, fails or times out.- Parameters:
currentTick- the number of ticks elapsed since the test started- Since:
- 0.1.0
-