Пример #1
0
        protected override void Context()
        {
            bot = new BotStub();

            var testCommand  = CommandStub.Make();
            var listCommands = new ListCommands(bot);

            this.exceptedResult = new List <string> {
                testCommand.GetKeyWord(), listCommands.GetKeyWord()
            };
        }
Пример #2
0
        public void ItStartsAndStopsABot()
        {
            BotRunner runner = new BotRunner();
            BotStub   bot    = new BotStub();

            runner.Start(bot);

            Thread.Sleep(millisecondsTimeout: 100);
            runner.Stop();

            Assert.Greater(bot.get_updates_numcalls, 0);
            Assert.Greater(bot.handle_update_numcalls, 0);
        }
Пример #3
0
 protected override PartChannel CreateSubjectUnderTest()
 {
     this.bot = new BotStub();
     return(new PartChannel(bot));
 }