コード例 #1
0
        public void PokerHandShouldBeFlush()
        {
            Hand hand = new Hand(
                new List <ICard>()
            {
                new Card(CardFace.Two, CardSuit.Spades),
                new Card(CardFace.Queen, CardSuit.Spades),
                new Card(CardFace.Ten, CardSuit.Spades),
                new Card(CardFace.Seven, CardSuit.Spades),
                new Card(CardFace.Ace, CardSuit.Spades)
            });

            if (!checker.IsValidHand(hand))
            {
                Assert.Fail("Hand must be valid!");
            }

            Assert.IsTrue(checker.IsFlush(hand));
        }
コード例 #2
0
        public void TestOnHandWithNoCards()
        {
            var handWithNoCards = new Hand(new List <ICard>());
            var expected        = false;
            var actual          = _pokerHandsChecker.IsFlush(handWithNoCards);

            Assert.AreEqual(expected, actual);
        }