public MockBotFactory WithThisActionProvider(IKnowWhatBotsDo ikwbd, IProvideBotInteractivity ipba) { PrepareWithActionProvider = true; botQueryProvider = ikwbd; botInteractivityProvider = ipba; return(this); }
public void PrepareForBattle(IProvideBotInteractivity botActionSupport, IKnowWhatBotsDo botInfoSupport, Guid publicIdentity) { b.Assert.True(botActionSupport != null, "BotBase - PrepareForBattle - Initialise called with Null for BotActionSupport "); b.Assert.True(botInfoSupport != null, "BotBase - PrepareForBattle - Initialise called with Null for BotInfoSupport"); PublicId = publicIdentity; engineActionProvider = botActionSupport; engineQueryProvider = botInfoSupport; BotPrepareForBattle(); }
public MockBotFactory WithMockActionProvider() { PrepareWithActionProvider = true; var mbap = new MockBotActionProvider(); botQueryProvider = mbap; botInteractivityProvider = mbap; MockActionProviderUsed = mbap; return(this); }
public void InjectBotSupport(IKnowWhatBotsDo query = null, IProvideBotInteractivity activity = null) { HasSupportBeenInjected = true; if (query == null) { b.Verbose.Log("Creating internal message support"); defaultSupport = new bd2MessageBasedBotSupport(); botSupportQuery = defaultSupport; botSupportActivity = defaultSupport; defaultSupport.InjectHub(hub); } else { botSupportQuery = query; botSupportActivity = activity; } }
public TestEngineFactory WithBotSupport(IKnowWhatBotsDo ikwbd = null, IProvideBotInteractivity ipba = null) { injectBotSupport = true; if (ikwbd == null) { if (ipba != null) { throw new InvalidOperationException("Need both null"); } bd2MessageBasedBotSupport mbSupport = new bd2MessageBasedBotSupport(); inj_ikwbd = mbSupport; inj_ipba = mbSupport; } else { inj_ikwbd = ikwbd; inj_ipba = ipba; } return(this); }