Example #1
0
        public void ReturnNoFreeBotsResultWhenAllBotsAreWorkedOrCrashed()
        {
            dataContext.AddBotWith("plaprobot2", EBotState.Crashed);
            var query = new InviteQuery {
                UserIds = new ulong[] { 123 }
            };

            var result = gameWorker.Invite(query);

            Assert.AreEqual(EGameWorkerResult.NoFreeBots, result, "Test does not return 'NoFreeBots' result.");
        }
Example #2
0
        public void SetupData()
        {
            dataContext = new MemoryDataContext();
            dataContext.AddBotWith("plaprobot", EBotState.Worked);

            botRepository = new BotRepository(dataContext);
            logger        = new LoggerStub();
            steamClient   = new SteamClientMock(logger);
            gameWorker    = new GameWorker(botRepository, logger, steamClient);
        }