public void ReturnNullWhenAllBotsAreWorkedOrCrashed()
        {
            var botDataContext = new MemoryDataContext();
            var bot1           = new BotModel
            {
                Login = "******",
                State = EBotState.Worked,
            };

            botDataContext.AddBot(bot1);

            var bot2 = new BotModel
            {
                Login = "******",
                State = EBotState.Crashed,
            };

            botDataContext.AddBot(bot2);

            var botRepository = new BotRepository(botDataContext);

            var resultBot = botRepository.GetFreeBot();

            Assert.IsNull(resultBot, "There are free bots in this test.");
        }
        public void LoginIsCorrectWhenFreeBotIsExisted()
        {
            var          botDataContext = new MemoryDataContext();
            const string botLogin       = "******";
            var          bot            = new BotModel
            {
                Login = botLogin,
                State = EBotState.Free,
            };

            botDataContext.AddBot(bot);
            var botRepository = new BotRepository(botDataContext);

            var resultBot = botRepository.GetFreeBot();

            Assert.AreEqual(botLogin, resultBot.Login, "Not correct bot's login.");
        }