Package io.molr.mole.core.testing.strand
Interface StrandExecutorTestSupport
-
- All Known Subinterfaces:
SingleMissionStrandExecutorTestSupport
- All Known Implementing Classes:
AbstractSingleMissionStrandExecutorTest
public interface StrandExecutorTestSupport
Provides support default methods for testing strand executor behaviour
-
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description default org.assertj.core.api.ListAssert<Exception>
assertThat(StrandErrorsRecorder recorder)
default org.assertj.core.api.IterableAssert<StrandCommand>
assertThatAllowedCommandsOf(StrandExecutor executor)
default org.assertj.core.api.ObjectAssert<Block>
assertThatBlockOf(StrandExecutor strandExecutor)
default org.assertj.core.api.AbstractComparableAssert<?,Result>
assertThatResultOf(TreeTracker<Result> resultTracker, Block block)
default org.assertj.core.api.AbstractComparableAssert<?,RunState>
assertThatStateOf(StrandExecutor executor)
default Set<StrandExecutor>
childrenStrandExecutorsOf(StrandExecutor executor)
default void
instructAsync(StrandExecutor executor, StrandCommand command)
Will instruct the specified command on the specifiedStrandExecutor
and return immediatelystatic void
instructSync(StrandExecutor executor, StrandCommand command)
Will instruct the specified command on the specifiedStrandExecutor
and wait for it to be processed processingdefault StrandErrorsRecorder
recordStrandErrors(StrandExecutor executor)
default void
waitForErrorOfType(StrandErrorsRecorder recorder, Class<? extends Exception> clazz)
static void
waitForProcessedCommand(StrandExecutor strandExecutor, long id)
default void
waitUntilResultOfBlockIs(TreeTracker<Result> resultTracker, Block block, Result result)
default void
waitUntilStrandBlockIs(StrandExecutor strandExecutor, Block block)
default void
waitUntilStrandIsFinished(StrandExecutor strandExecutor)
default void
waitUntilStrandStateIs(StrandExecutor strandExecutor, RunState state)
-
-
-
Field Detail
-
TIMEOUT
static final Duration TIMEOUT
-
-
Method Detail
-
waitUntilStrandStateIs
default void waitUntilStrandStateIs(StrandExecutor strandExecutor, RunState state)
-
waitUntilStrandIsFinished
default void waitUntilStrandIsFinished(StrandExecutor strandExecutor)
-
waitUntilStrandBlockIs
default void waitUntilStrandBlockIs(StrandExecutor strandExecutor, Block block)
-
waitUntilResultOfBlockIs
default void waitUntilResultOfBlockIs(TreeTracker<Result> resultTracker, Block block, Result result)
-
waitForProcessedCommand
static void waitForProcessedCommand(StrandExecutor strandExecutor, long id)
-
waitForErrorOfType
default void waitForErrorOfType(StrandErrorsRecorder recorder, Class<? extends Exception> clazz)
-
assertThatResultOf
default org.assertj.core.api.AbstractComparableAssert<?,Result> assertThatResultOf(TreeTracker<Result> resultTracker, Block block)
-
assertThatBlockOf
default org.assertj.core.api.ObjectAssert<Block> assertThatBlockOf(StrandExecutor strandExecutor)
-
assertThatStateOf
default org.assertj.core.api.AbstractComparableAssert<?,RunState> assertThatStateOf(StrandExecutor executor)
-
assertThat
default org.assertj.core.api.ListAssert<Exception> assertThat(StrandErrorsRecorder recorder)
-
assertThatAllowedCommandsOf
default org.assertj.core.api.IterableAssert<StrandCommand> assertThatAllowedCommandsOf(StrandExecutor executor)
-
recordStrandErrors
default StrandErrorsRecorder recordStrandErrors(StrandExecutor executor)
-
childrenStrandExecutorsOf
default Set<StrandExecutor> childrenStrandExecutorsOf(StrandExecutor executor)
-
instructSync
static void instructSync(StrandExecutor executor, StrandCommand command)
Will instruct the specified command on the specifiedStrandExecutor
and wait for it to be processed processing- Parameters:
executor
- the executor on which to perform the given commandcommand
- the command with which to instruct the given executor
-
instructAsync
default void instructAsync(StrandExecutor executor, StrandCommand command)
Will instruct the specified command on the specifiedStrandExecutor
and return immediately- Parameters:
executor
- the executor which shall be instructed with the given commandcommand
- the command with which the given executor shall be instructed
-
-