示例#1
0
        public MockBotFactory WithThisActionProvider(IKnowWhatBotsDo ikwbd, IProvideBotInteractivity ipba)
        {
            PrepareWithActionProvider = true;

            botQueryProvider         = ikwbd;
            botInteractivityProvider = ipba;

            return(this);
        }
示例#2
0
        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();
        }
示例#3
0
        public MockBotFactory WithMockActionProvider()
        {
            PrepareWithActionProvider = true;

            var mbap = new MockBotActionProvider();

            botQueryProvider         = mbap;
            botInteractivityProvider = mbap;

            MockActionProviderUsed = mbap;

            return(this);
        }
示例#4
0
 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;
     }
 }
示例#5
0
        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);
        }