コード例 #1
0
        public void BotLosingTest()
        {
            var bot = new PrimitiveManchetanStrategyBot(exampleStartMoney, exampleStartRate);

            bot.Lose();
            Assert.IsTrue(bot.Money == exampleStartMoney - exampleStartRate);
            Assert.IsTrue(bot.CountGames == 1);
            Assert.IsTrue(bot.CountWinGames == 0);
            Assert.IsTrue(bot.IsWantNextGame);
        }
コード例 #2
0
        public void NextGamePreparationTest()
        {
            var bot = new PrimitiveManchetanStrategyBot(exampleStartMoney, exampleStartRate);

            bot.Win();
            Assert.IsTrue(bot.Rate == exampleStartRate * 2);

            bot.Win();
            Assert.IsTrue(bot.Rate == exampleStartRate);

            bot.Lose();
            Assert.IsTrue(bot.Rate == exampleStartRate);
        }