public class TockJUnit4Rule<T extends TestContext>
A JUnit4 Rule to initialize the context for each call.
public TockJUnit4Rule(@NotNull
ai.tock.bot.definition.BotDefinition botDefinition,
@NotNull
TestLifecycle<? extends T> lifecycle)
A JUnit4 Rule to initialize the context for each call.
@NotNull public T getTestContext()
The class TestContext.
class TestContext@NotNull public BotBusMock startNewBusMock(@NotNull ai.tock.bot.definition.StoryDefinition story, @NotNull ai.tock.bot.connector.ConnectorType connectorType, @NotNull java.util.Locale locale, @NotNull ai.tock.bot.engine.user.PlayerId userId)
Provides a mock initialized with the specified StoryDefinition and starts the story.
@NotNull public BotBusMock newBusMock(@NotNull ai.tock.bot.definition.StoryDefinition story, @NotNull ai.tock.bot.connector.ConnectorType connectorType, @NotNull java.util.Locale locale, @NotNull ai.tock.bot.engine.user.PlayerId userId)
Provides a mock initialized with the specified StoryDefinition.
@NotNull public BotBusMockContext newBusMockContext(@NotNull ai.tock.bot.definition.StoryDefinition story, @NotNull ai.tock.bot.connector.ConnectorType connectorType, @NotNull java.util.Locale locale, @NotNull ai.tock.bot.engine.user.PlayerId userId)
Provides a mock context initialized with the specified StoryDefinition.
@NotNull public BotBusMock startBusMock()
Provides a mock context initialized with the current testContext and runs the bus.
testContext@NotNull public BotBusMock busMock()
Provides a mock context initialized with the current testContext.
testContext@NotNull
public org.junit.runners.model.Statement apply(@NotNull
org.junit.runners.model.Statement base,
@NotNull
org.junit.runner.Description description)
@NotNull public ai.tock.bot.definition.BotDefinition getBotDefinition()
@NotNull public TestLifecycle<T> getLifecycle()