open class TockJUnit4Rule<out T : TestContext>
(source)
A JUnit4 Rule to initialize the context for each call.
<init> |
A JUnit4 Rule to initialize the context for each call. TockJUnit4Rule(botDefinition: BotDefinition, lifecycle: TestLifecycle<T> = TestLifecycle(TestContext() as T)) |
botDefinition |
val botDefinition: BotDefinition |
lifecycle |
val lifecycle: TestLifecycle<T> |
testContext |
The TestContext. val testContext: T |
apply |
open fun apply(base: <ERROR CLASS>, description: <ERROR CLASS>): <ERROR CLASS> |
busMock |
Provides a mock context initialized with the current testContext. fun busMock(): BotBusMock |
newBusMock |
Provides a mock initialized with the specified StoryDefinition. fun newBusMock(story: StoryDefinition = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId()): BotBusMock |
newBusMockContext |
Provides a mock context initialized with the specified StoryDefinition. fun newBusMockContext(story: StoryDefinition = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId()): BotBusMockContext |
startBusMock |
Provides a mock context initialized with the current testContext and runs the bus. fun startBusMock(): BotBusMock |
startNewBusMock |
Provides a mock initialized with the specified StoryDefinition and starts the story. fun startNewBusMock(story: StoryDefinition = testContext.defaultStoryDefinition(botDefinition), connectorType: ConnectorType = testContext.defaultConnectorType(), locale: Locale = testContext.defaultLocale(), userId: PlayerId = testContext.defaultPlayerId()): BotBusMock |