Esempio n. 1
0
        public void IsRoyalFlush()
        {
            var hand = PokerHandTestHelper.CreateRoyalFlushHand("Timmay");

            Assert.IsTrue(hand.IsRoyalFlush());
            Assert.AreEqual(CardRank.Ace, hand.RankHighCard);
        }
Esempio n. 2
0
        public void RoyalFlush_beats_StraightFlush()
        {
            var pokerGame = new PokerGame(PokerHandTestHelper.CreateStraightFlushHand("Player1"),
                                          PokerHandTestHelper.CreateRoyalFlushHand("Player2"));
            var result = pokerGame.PlayHand();

            Assert.AreEqual("Player2", result.WinningPlayer);
            Assert.AreEqual(HandRankResult.Royal_Flush, result.RankResult);
        }