Ejemplo n.º 1
0
        public void ShouldMatchStraightFlush()
        {
            IEnumerable<Card> result = new StraightFlush().Match(new[]
                                                                    {
                                                                        Picture.Ace.Of(Suit.Clubs),   //
                                                                        Picture.King.Of(Suit.Clubs),  //
                                                                        Picture.Queen.Of(Suit.Clubs), //
                                                                        Picture.Jack.Of(Suit.Clubs),  //
                                                                        10.Of(Suit.Clubs),            //
                                                                        Picture.Ace.Of(Suit.Spades),
                                                                        2.Of(Suit.Hearts)
                                                                    });

            Assert.That( result.Count(), Is.EqualTo(5), "Should have matched this straight flush.");
        }
Ejemplo n.º 2
0
        public void ShouldMatchWhenHighestFlushIsNotAStraight()
        {
            var cards = new[]
                            {
                                Picture.Ace.Of(Suit.Clubs),
                                Picture.Queen.Of(Suit.Clubs),   //
                                Picture.Jack.Of(Suit.Clubs),    //
                                10.Of(Suit.Clubs),              //
                                9.Of(Suit.Clubs),               //
                                8.Of(Suit.Clubs),               //
                                5.Of(Suit.Hearts)
                            };

            IEnumerable<Card> result = new StraightFlush().Match(cards);

            Assert.That(result.Count(), Is.EqualTo(5), "Should have matched this straight flush.");
        }