Package ai.tock.bot.test
Class BotBusMockContext
-
- All Implemented Interfaces:
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>snapshotsprivate final Set<ConnectorType>connectorsCompatibleWith
-
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, Set<ConnectorType> connectorsCompatibleWith)BotBusMockContext(BotDefinition botDefinition, StoryDefinition storyDefinition, String applicationId, PlayerId userId, PlayerId botId, Action action, UserInterfaceType userInterfaceType, UserPreferences userPreferences, ConnectorType connectorType, TestContext testContext, Set<ConnectorType> connectorsCompatibleWith)BotBusMockContext(UserTimeline userTimeline, Dialog dialog, Story story, Action firstAction, BotDefinition botDefinition, I18nKeyProvider i18nProvider, UserInterfaceType userInterfaceType, ConnectorType connectorType, TestContext testContext, List<Snapshot> snapshots, Set<ConnectorType> connectorsCompatibleWith)
-
Method Summary
Modifier and Type Method Description 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 UnitsetUserTimeline(UserTimeline userTimeline)final DialoggetDialog()final UnitsetDialog(Dialog dialog)final StorygetStory()final UnitsetStory(Story story)final ActiongetFirstAction()final UnitsetFirstAction(Action firstAction)final BotDefinitiongetBotDefinition()final UnitsetBotDefinition(BotDefinition botDefinition)final I18nKeyProvidergetI18nProvider()final UnitsetI18nProvider(I18nKeyProvider i18nProvider)final UserInterfaceTypegetUserInterfaceType()final UnitsetUserInterfaceType(UserInterfaceType userInterfaceType)final ConnectorTypegetConnectorType()final UnitsetConnectorType(ConnectorType connectorType)final TestContextgetTestContext()final List<Snapshot>getSnapshots()final Set<ConnectorType>getConnectorsCompatibleWith()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. -
-
Constructor Detail
-
BotBusMockContext
BotBusMockContext(String applicationId, PlayerId userId, PlayerId botId, BotDefinition botDefinition, StoryDefinition storyDefinition, Action action, UserInterfaceType userInterfaceType, UserPreferences userPreferences, ConnectorType connectorType, TestContext testContext, Set<ConnectorType> connectorsCompatibleWith)
-
BotBusMockContext
BotBusMockContext(BotDefinition botDefinition, StoryDefinition storyDefinition, String applicationId, PlayerId userId, PlayerId botId, Action action, UserInterfaceType userInterfaceType, UserPreferences userPreferences, ConnectorType connectorType, TestContext testContext, Set<ConnectorType> connectorsCompatibleWith)
-
BotBusMockContext
BotBusMockContext(UserTimeline userTimeline, Dialog dialog, Story story, Action firstAction, BotDefinition botDefinition, I18nKeyProvider i18nProvider, UserInterfaceType userInterfaceType, ConnectorType connectorType, TestContext testContext, List<Snapshot> snapshots, Set<ConnectorType> connectorsCompatibleWith)
-
-
Method Detail
-
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()
-
setUserTimeline
final Unit setUserTimeline(UserTimeline userTimeline)
-
getDialog
final Dialog getDialog()
-
getStory
final Story getStory()
-
getFirstAction
final Action getFirstAction()
-
setFirstAction
final Unit setFirstAction(Action firstAction)
-
getBotDefinition
final BotDefinition getBotDefinition()
-
setBotDefinition
final Unit setBotDefinition(BotDefinition botDefinition)
-
getI18nProvider
final I18nKeyProvider getI18nProvider()
-
setI18nProvider
final Unit setI18nProvider(I18nKeyProvider i18nProvider)
-
getUserInterfaceType
final UserInterfaceType getUserInterfaceType()
-
setUserInterfaceType
final Unit setUserInterfaceType(UserInterfaceType userInterfaceType)
-
getConnectorType
final ConnectorType getConnectorType()
-
setConnectorType
final Unit setConnectorType(ConnectorType connectorType)
-
getTestContext
final TestContext getTestContext()
-
getSnapshots
final List<Snapshot> getSnapshots()
-
getConnectorsCompatibleWith
final Set<ConnectorType> getConnectorsCompatibleWith()
-
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.
-
-
-
-