Exemplo n.º 1
0
        public void ShouldReject()
        {
            IEnumerable<Card> result = new TwoPair().Match(new[] {
                                                                        Picture.Ace.Of(Suit.Spades),
                                                                        Picture.Queen.Of(Suit.Hearts),
                                                                        Picture.Ace.Of(Suit.Diamonds),
                                                                        Picture.King.Of(Suit.Spades),
                                                                        Picture.Jack.Of(Suit.Clubs),
                                                                        2.Of(Suit.Hearts),
                                                                        3.Of(Suit.Clubs)
                                                                    });

            Assert.That(result, Is.Null, "Should have correctly rejected.");
        }
Exemplo n.º 2
0
        public void ShouldDetectCorrectKicker()
        {
            IEnumerable<Card> result = new TwoPair().Match(new[] {
                                                                Picture.Ace.Of(Suit.Spades),
                                                                Picture.Ace.Of(Suit.Hearts),
                                                                Picture.Jack.Of(Suit.Clubs),
                                                                8.Of(Suit.Diamonds),
                                                                8.Of(Suit.Spades),
                                                                2.Of(Suit.Hearts),
                                                                3.Of(Suit.Clubs)
                                                                });

            Assert.That(result.Count(), Is.EqualTo(4), "Should have correctly identified the hand.");
        }