Exemplo n.º 1
0
            public void FourSevensAndTwo()
            {
                // ARRANGE
                var fourAces = FourAcesAndANine().Cards.Where(
                    c =>
                        Rank.ACE == c.Rank);

                var fourSevens = fourAces.Select(
                    c =>
                        new Card(Rank.SEVEN, c.Suit)).ToArray();

                var game = new Game(
                    fourSevens[0],
                    fourSevens[1],
                    fourSevens[2],
                    fourSevens[3],
                    CardBuilder.Two().Clubs());

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

                // ASSERT
                Assert.IsTrue(result.Success());
                CollectionAssert.AreEquivalent(fourSevens.ToList(), result.UsedCards.ToList());
            }
Exemplo n.º 2
0
            public void FourAcesAndNine()
            {
                // ARRANGE
                var game = FourAcesAndANine();

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

                // ASSERT
                Assert.IsTrue(result.Success());
                CollectionAssert.AreEquivalent(game.Cards.Where(c => Rank.ACE == c.Rank).ToList(), result.UsedCards.ToList());
            }