public void TexasHoldemHand_HighCard()
        {
            var test     = new TexasHoldemHandFactory().ConstructCrappyHand();
            var expected = new Card(new Suit(SuitNames.SPADE), 7);

            Assert.AreEqual(expected, test.HighCard);
        }
        public void TexasHoldemHand_HighCardIsAce()
        {
            var test     = new TexasHoldemHandFactory().ConstructCrappyHand();
            var expected = new Card(new Suit(SuitNames.SPADE), CardValues.ACE);

            test.Discard();
            test.Add(expected);

            Assert.AreEqual(expected, test.HighCard);
        }
        public void TexasHoldemHand_Clear_DiscardsAllCards()
        {
            var test = new TexasHoldemHandFactory().ConstructCrappyHand();

            Assert.AreEqual(5, test.Count);

            test.Clear();

            Assert.AreEqual(0, test.Count);
        }
        public void TexasHoldemHand_Discard()
        {
            var test         = new TexasHoldemHandFactory().ConstructCrappyHand();
            var initialCount = test.Count;

            test.Discard();
            test.Discard();

            Assert.AreEqual(initialCount - 2, test.Count);
        }
        public void HandRanking_Rank_StraightFlush()
        {
            var test = ConstructTestObject();
            var hand = new TexasHoldemHandFactory().ConstructStraightFlush(SuitFactory.Club, 8);

            Assert.IsNotNull(test);

            var actual = test.Rank(hand);

            Assert.AreEqual(HandRankEnum.StraighFlush, actual.Rank);
            Assert.AreEqual(8, actual.RankHighCardValue);
            Assert.AreEqual(0, actual.RankSecondHighCardValue);           // Not set.
            Assert.AreEqual(8, actual.HighCardValue);
        }
        public void HandRanking_Rank_FourOfAKind()
        {
            var test = ConstructTestObject();
            var hand = new TexasHoldemHandFactory().ConstructFourOfAKind(5, 10);

            Assert.IsNotNull(test);

            var actual = test.Rank(hand);

            Assert.AreEqual(HandRankEnum.FourOfAKind, actual.Rank);
            Assert.AreEqual(5, actual.RankHighCardValue);
            Assert.AreEqual(10, actual.RankSecondHighCardValue);
            Assert.AreEqual(10, actual.HighCardValue);
        }
        public void TexasHoldemHand_IsNotTwoPair()
        {
            var test = new TexasHoldemHandFactory().ConstructCrappyHand();

            Assert.IsFalse(test.IsTwoPair);
        }
        public void TexasHoldemHand_IsNotThreeOfAKind()
        {
            var test = new TexasHoldemHandFactory().ConstructCrappyHand();

            Assert.IsFalse(test.IsThreeOfAKind);
        }
        public void TexasHoldemHand_IsNotFullHouse()
        {
            var test = new TexasHoldemHandFactory().ConstructCrappyHand();

            Assert.IsFalse(test.IsFullHouse);
        }