コード例 #1
0
            public void SpadesTwoToSix()
            {
                // ARRANGE
                var game = StraightFlushGameBuilder.Spades()
                    .From(Rank.TWO).To(Rank.SIX);

                // ACT
                var result = new StraightFlush().Evaluate(game);

                // ASSERT
                Assert.IsTrue(result.Success());
                Assert.AreSame(game.Cards, result.UsedCards);
            }
コード例 #2
0
            public void DiamondsFiveToNine()
            {
                // ARRANGE
                var game = StraightFlushGameBuilder.Diamonds()
                    .From(Rank.FIVE).To(Rank.NINE);

                // ACT
                var result = new StraightFlush().Evaluate(game);

                // ASSERT
                Assert.IsTrue(result.Success());
                Assert.AreSame(game.Cards, result.UsedCards);
            }
コード例 #3
0
            public void WrapAround()
            {
                // ARRANGE
                var game = new Game(
                    CardBuilder.King().Hearths(),
                    CardBuilder.Ace().Hearths(),
                    CardBuilder.Two().Hearths(),
                    CardBuilder.Three().Hearths(),
                    CardBuilder.Four().Hearths());

                // ACT
                var result = new StraightFlush().Evaluate(game);

                // ASSERT
                Assert.IsFalse(result.Success());
            }