-
public final class BotBusMockContextThe context of the test.
-
-
Field Summary
Fields Modifier and Type Field Description private final StringapplicationIdprivate final PlayerIdbotIdprivate final PlayerIduserIdprivate final UserPreferencesuserPreferencesprivate final UserPreferencesinitialUserPreferencesprivate final List<BotBusMockLog>answersprivate final BotBusMockLogfirstAnswerprivate final BotBusMockLogsecondAnswerprivate final BotBusMockLogthirdAnswerprivate final BotBusMockLoglastAnswerprivate UserTimelineuserTimelineprivate Dialogdialogprivate Storystoryprivate ActionfirstActionprivate BotDefinitionbotDefinitionprivate I18nKeyProvideri18nProviderprivate UserInterfaceTypeuserInterfaceTypeprivate ConnectorTypeconnectorTypeprivate final TestContexttestContextprivate final List<Snapshot>snapshots
-
Constructor Summary
Constructors Constructor Description BotBusMockContext(String applicationId, PlayerId userId, PlayerId botId, BotDefinition botDefinition, StoryDefinition storyDefinition, Action action, UserInterfaceType userInterfaceType, UserPreferences userPreferences, ConnectorType connectorType, TestContext testContext)BotBusMockContext(BotDefinition botDefinition, StoryDefinition storyDefinition, String applicationId, PlayerId userId, PlayerId botId, Action action, UserInterfaceType userInterfaceType, UserPreferences userPreferences, ConnectorType connectorType, TestContext testContext)BotBusMockContext(UserTimeline userTimeline, Dialog dialog, Story story, Action firstAction, BotDefinition botDefinition, I18nKeyProvider i18nProvider, UserInterfaceType userInterfaceType, ConnectorType connectorType, TestContext testContext, List<Snapshot> snapshots)
-
Method Summary
Modifier and Type Method Description final UnitresetUserPreferences(UserPreferences userPreferences)Reset user preferences. final SendSentencesentence(String text, EntityValue entityValues)Create a new sentence for this context. final SendSentencesentence(String text, List<EntityValue> entityValues)Create a new sentence for this context. final SendSentencesentence(String text, IntentAware intent, EntityValue entityValues)Create a new sentence for this context. final SendSentencesentence(String text, IntentAware intent, List<EntityValue> entityValues)Create a new sentence for this context. final SendSentencesentence(ConnectorMessage message, EntityValue entityValues)Create a new sentence for this context. final SendSentencesentence(ConnectorMessage message, List<EntityValue> entityValues)Create a new sentence for this context. final SendSentencesentence(ConnectorMessage message, IntentAware intent, EntityValue entityValues)Create a new sentence for this context. final SendSentencesentence(ConnectorMessage message, IntentAware intent, List<EntityValue> entityValues)Create a new sentence for this context. final SendChoicechoice(String intentName, Pair<String, String> parameters)Create a choice for this context. final SendChoicechoice(String intentName, StoryStep<out StoryHandlerDefinition> step, Pair<String, String> parameters)Create a choice for this context. final SendChoicechoice(IntentAware intent, StoryStep<out StoryHandlerDefinition> step, Parameters parameters)Create a choice for this context. final SendChoicechoice(IntentAware intent, Parameters parameters)Create a choice for this context. final SendChoicechoiceOfId(String choiceId)Create a choice for this context. final UserTimelinecomponent1()final Dialogcomponent2()final Storycomponent3()final Actioncomponent4()final BotDefinitioncomponent5()final I18nKeyProvidercomponent6()final UserInterfaceTypecomponent7()final ConnectorTypecomponent8()final TestContextcomponent9()final List<Snapshot>component10()final BotBusMockContextcopy(UserTimeline userTimeline, Dialog dialog, Story story, Action firstAction, BotDefinition botDefinition, I18nKeyProvider i18nProvider, UserInterfaceType userInterfaceType, ConnectorType connectorType, TestContext testContext, List<Snapshot> snapshots)final StringgetApplicationId()final PlayerIdgetBotId()final PlayerIdgetUserId()final UserPreferencesgetUserPreferences()final UserPreferencesgetInitialUserPreferences()final List<BotBusMockLog>getAnswers()final BotBusMockLoggetFirstAnswer()final BotBusMockLoggetSecondAnswer()final BotBusMockLoggetThirdAnswer()final BotBusMockLoggetLastAnswer()final UserTimelinegetUserTimeline()final DialoggetDialog()final StorygetStory()final ActiongetFirstAction()final BotDefinitiongetBotDefinition()final I18nKeyProvidergetI18nProvider()final UserInterfaceTypegetUserInterfaceType()final ConnectorTypegetConnectorType()final TestContextgetTestContext()final List<Snapshot>getSnapshots()final UnitsetUserTimeline(UserTimeline userTimeline)final UnitsetDialog(Dialog dialog)final UnitsetStory(Story story)final UnitsetFirstAction(Action firstAction)final UnitsetBotDefinition(BotDefinition botDefinition)final UnitsetI18nProvider(I18nKeyProvider i18nProvider)final UnitsetUserInterfaceType(UserInterfaceType userInterfaceType)final UnitsetConnectorType(ConnectorType connectorType)-
-
Constructor Detail
-
BotBusMockContext
BotBusMockContext(String applicationId, PlayerId userId, PlayerId botId, BotDefinition botDefinition, StoryDefinition storyDefinition, Action action, UserInterfaceType userInterfaceType, UserPreferences userPreferences, ConnectorType connectorType, TestContext testContext)
-
BotBusMockContext
BotBusMockContext(BotDefinition botDefinition, StoryDefinition storyDefinition, String applicationId, PlayerId userId, PlayerId botId, Action action, UserInterfaceType userInterfaceType, UserPreferences userPreferences, ConnectorType connectorType, TestContext testContext)
-
BotBusMockContext
BotBusMockContext(UserTimeline userTimeline, Dialog dialog, Story story, Action firstAction, BotDefinition botDefinition, I18nKeyProvider i18nProvider, UserInterfaceType userInterfaceType, ConnectorType connectorType, TestContext testContext, List<Snapshot> snapshots)
-
-
Method Detail
-
resetUserPreferences
final Unit resetUserPreferences(UserPreferences userPreferences)
Reset user preferences.
-
sentence
final SendSentence sentence(String text, EntityValue entityValues)
Create a new sentence for this context.
-
sentence
final SendSentence sentence(String text, List<EntityValue> entityValues)
Create a new sentence for this context.
-
sentence
final SendSentence sentence(String text, IntentAware intent, EntityValue entityValues)
Create a new sentence for this context.
-
sentence
final SendSentence sentence(String text, IntentAware intent, List<EntityValue> entityValues)
Create a new sentence for this context.
-
sentence
final SendSentence sentence(ConnectorMessage message, EntityValue entityValues)
Create a new sentence for this context.
-
sentence
final SendSentence sentence(ConnectorMessage message, List<EntityValue> entityValues)
Create a new sentence for this context.
-
sentence
final SendSentence sentence(ConnectorMessage message, IntentAware intent, EntityValue entityValues)
Create a new sentence for this context.
-
sentence
final SendSentence sentence(ConnectorMessage message, IntentAware intent, List<EntityValue> entityValues)
Create a new sentence for this context.
-
choice
final SendChoice choice(String intentName, Pair<String, String> parameters)
Create a choice for this context.
-
choice
final SendChoice choice(String intentName, StoryStep<out StoryHandlerDefinition> step, Pair<String, String> parameters)
Create a choice for this context.
-
choice
final SendChoice choice(IntentAware intent, StoryStep<out StoryHandlerDefinition> step, Parameters parameters)
Create a choice for this context.
-
choice
final SendChoice choice(IntentAware intent, Parameters parameters)
Create a choice for this context.
-
choiceOfId
final SendChoice choiceOfId(String choiceId)
Create a choice for this context.
-
component1
final UserTimeline component1()
-
component2
final Dialog component2()
-
component3
final Story component3()
-
component4
final Action component4()
-
component5
final BotDefinition component5()
-
component6
final I18nKeyProvider component6()
-
component7
final UserInterfaceType component7()
-
component8
final ConnectorType component8()
-
component9
final TestContext component9()
-
component10
final List<Snapshot> component10()
-
copy
final BotBusMockContext copy(UserTimeline userTimeline, Dialog dialog, Story story, Action firstAction, BotDefinition botDefinition, I18nKeyProvider i18nProvider, UserInterfaceType userInterfaceType, ConnectorType connectorType, TestContext testContext, List<Snapshot> snapshots)
-
getApplicationId
final String getApplicationId()
-
getBotId
final PlayerId getBotId()
-
getUserId
final PlayerId getUserId()
-
getUserPreferences
final UserPreferences getUserPreferences()
-
getInitialUserPreferences
final UserPreferences getInitialUserPreferences()
-
getAnswers
final List<BotBusMockLog> getAnswers()
-
getFirstAnswer
final BotBusMockLog getFirstAnswer()
-
getSecondAnswer
final BotBusMockLog getSecondAnswer()
-
getThirdAnswer
final BotBusMockLog getThirdAnswer()
-
getLastAnswer
final BotBusMockLog getLastAnswer()
-
getUserTimeline
final UserTimeline getUserTimeline()
-
getDialog
final Dialog getDialog()
-
getStory
final Story getStory()
-
getFirstAction
final Action getFirstAction()
-
getBotDefinition
final BotDefinition getBotDefinition()
-
getI18nProvider
final I18nKeyProvider getI18nProvider()
-
getUserInterfaceType
final UserInterfaceType getUserInterfaceType()
-
getConnectorType
final ConnectorType getConnectorType()
-
getTestContext
final TestContext getTestContext()
-
getSnapshots
final List<Snapshot> getSnapshots()
-
setUserTimeline
final Unit setUserTimeline(UserTimeline userTimeline)
-
setFirstAction
final Unit setFirstAction(Action firstAction)
-
setBotDefinition
final Unit setBotDefinition(BotDefinition botDefinition)
-
setI18nProvider
final Unit setI18nProvider(I18nKeyProvider i18nProvider)
-
setUserInterfaceType
final Unit setUserInterfaceType(UserInterfaceType userInterfaceType)
-
setConnectorType
final Unit setConnectorType(ConnectorType connectorType)
-
-
-
-