예제 #1
0
        public void AHandOf0CardsIsWorthNothing()
        {
            var sut = new PokerHand();

            var handStrength = sut.GetHandStrength();

            Assert.AreEqual(HandStrength.Nothing, handStrength);
        }
예제 #2
0
        public void CanIdentifyThreeOfAKind()
        {
            var sut = new PokerHand();

            sut.AddCard(new Card(Suit.Heart, Value.Two));
            sut.AddCard(new Card(Suit.Club, Value.Two));
            sut.AddCard(new Card(Suit.Spade, Value.Seven));
            sut.AddCard(new Card(Suit.Diamond, Value.Eight));
            sut.AddCard(new Card(Suit.Heart, Value.Two));

            var handStrength = sut.GetHandStrength();

            Assert.AreEqual(HandStrength.ThreeOfAKind, handStrength);
        }
예제 #3
0
        public void AHandOf5UnrelatedCardsIsWorthNothing()
        {
            var sut = new PokerHand();

            sut.AddCard(new Card(Suit.Heart, Value.Two));
            sut.AddCard(new Card(Suit.Club, Value.Three));
            sut.AddCard(new Card(Suit.Spade, Value.Seven));
            sut.AddCard(new Card(Suit.Diamond, Value.Eight));
            sut.AddCard(new Card(Suit.Heart, Value.Ten));

            var handStrength = sut.GetHandStrength();

            Assert.AreEqual(HandStrength.Nothing, handStrength);
        }