public void TestCardIdentificationStraightFlush() { {//Straight flush PokerHand.HandType expected = PokerHand.HandType.STRAIGHT_FLUSH; PokerHand.HandType actual = GetType(new PlayingCard(PlayingCard.Rank.JACK, PlayingCard.Suit.CLUBS), new PlayingCard(PlayingCard.Rank.TEN, PlayingCard.Suit.CLUBS), new PlayingCard(PlayingCard.Rank.NINE, PlayingCard.Suit.CLUBS), new PlayingCard(PlayingCard.Rank.EIGHT, PlayingCard.Suit.CLUBS), new PlayingCard(PlayingCard.Rank.SEVEN, PlayingCard.Suit.CLUBS)); Assert.AreEqual(expected, actual, "Not same type"); } }
public void TestCardIdentificationStraight() { {//Straight PokerHand.HandType expected = PokerHand.HandType.STRAIGHT; PokerHand.HandType actual = GetType( new PlayingCard(PlayingCard.Rank.TEN, PlayingCard.Suit.DIAMONDS), new PlayingCard(PlayingCard.Rank.NINE, PlayingCard.Suit.SPADES), new PlayingCard(PlayingCard.Rank.EIGHT, PlayingCard.Suit.HEARTS), new PlayingCard(PlayingCard.Rank.SEVEN, PlayingCard.Suit.DIAMONDS), new PlayingCard(PlayingCard.Rank.SIX, PlayingCard.Suit.CLUBS)); Assert.AreEqual(expected, actual, "Not same type"); } }
public void TestCardIdentificationFullHouse() { {//Full house PokerHand.HandType expected = PokerHand.HandType.FULL_HOUSE; PokerHand.HandType actual = GetType( new PlayingCard(PlayingCard.Rank.SIX, PlayingCard.Suit.SPADES), new PlayingCard(PlayingCard.Rank.SIX, PlayingCard.Suit.HEARTS), new PlayingCard(PlayingCard.Rank.SIX, PlayingCard.Suit.DIAMONDS), new PlayingCard(PlayingCard.Rank.KING, PlayingCard.Suit.SPADES), new PlayingCard(PlayingCard.Rank.KING, PlayingCard.Suit.HEARTS)); Assert.AreEqual(expected, actual, "Not same type"); } }
public void TestCardIdentificationFourKind() { {//Four kind PokerHand.HandType expected = PokerHand.HandType.FOUR_KIND; PokerHand.HandType actual = GetType( new PlayingCard(PlayingCard.Rank.FIVE, PlayingCard.Suit.CLUBS), new PlayingCard(PlayingCard.Rank.FIVE, PlayingCard.Suit.DIAMONDS), new PlayingCard(PlayingCard.Rank.FIVE, PlayingCard.Suit.HEARTS), new PlayingCard(PlayingCard.Rank.FIVE, PlayingCard.Suit.SPADES), new PlayingCard(PlayingCard.Rank.TWO, PlayingCard.Suit.DIAMONDS)); Assert.AreEqual(expected, actual, "Not same type"); } }
public void TestCardIdentificationFlush() { {//Flush PokerHand.HandType expected = PokerHand.HandType.FLUSH; PokerHand.HandType actual = GetType( new PlayingCard(PlayingCard.Rank.JACK, PlayingCard.Suit.DIAMONDS), new PlayingCard(PlayingCard.Rank.NINE, PlayingCard.Suit.DIAMONDS), new PlayingCard(PlayingCard.Rank.EIGHT, PlayingCard.Suit.DIAMONDS), new PlayingCard(PlayingCard.Rank.FOUR, PlayingCard.Suit.DIAMONDS), new PlayingCard(PlayingCard.Rank.THREE, PlayingCard.Suit.DIAMONDS)); Assert.AreEqual(expected, actual, "Not same type"); } }
public void TestCardIdentificationHighCard() { {//HighCard PokerHand.HandType expected = PokerHand.HandType.HIGH_CARD; PokerHand.HandType actual = GetType( new PlayingCard(PlayingCard.Rank.KING, PlayingCard.Suit.DIAMONDS), new PlayingCard(PlayingCard.Rank.QUEEN, PlayingCard.Suit.DIAMONDS), new PlayingCard(PlayingCard.Rank.SEVEN, PlayingCard.Suit.SPADES), new PlayingCard(PlayingCard.Rank.FOUR, PlayingCard.Suit.SPADES), new PlayingCard(PlayingCard.Rank.THREE, PlayingCard.Suit.HEARTS)); Assert.AreEqual(expected, actual, "Not same type"); } }
public void TestCardIdentificationOnePair() { {//One Pair PokerHand.HandType expected = PokerHand.HandType.ONE_PAIR; PokerHand.HandType actual = GetType( new PlayingCard(PlayingCard.Rank.TEN, PlayingCard.Suit.SPADES), new PlayingCard(PlayingCard.Rank.TEN, PlayingCard.Suit.HEARTS), new PlayingCard(PlayingCard.Rank.EIGHT, PlayingCard.Suit.SPADES), new PlayingCard(PlayingCard.Rank.SEVEN, PlayingCard.Suit.HEARTS), new PlayingCard(PlayingCard.Rank.FOUR, PlayingCard.Suit.CLUBS)); Assert.AreEqual(expected, actual, "Not same type"); } }
public void TestCardIdentificationTwoPair() { {//Two Pair PokerHand.HandType expected = PokerHand.HandType.TWO_PAIR; PokerHand.HandType actual = GetType( new PlayingCard(PlayingCard.Rank.JACK, PlayingCard.Suit.HEARTS), new PlayingCard(PlayingCard.Rank.JACK, PlayingCard.Suit.SPADES), new PlayingCard(PlayingCard.Rank.THREE, PlayingCard.Suit.CLUBS), new PlayingCard(PlayingCard.Rank.THREE, PlayingCard.Suit.SPADES), new PlayingCard(PlayingCard.Rank.TWO, PlayingCard.Suit.HEARTS)); Assert.AreEqual(expected, actual, "Not same type"); } }
public void TestCardIdentificationThreeKind() { {//Three of a Kind PokerHand.HandType expected = PokerHand.HandType.THREE_KIND; PokerHand.HandType actual = GetType( new PlayingCard(PlayingCard.Rank.QUEEN, PlayingCard.Suit.CLUBS), new PlayingCard(PlayingCard.Rank.QUEEN, PlayingCard.Suit.SPADES), new PlayingCard(PlayingCard.Rank.QUEEN, PlayingCard.Suit.HEARTS), new PlayingCard(PlayingCard.Rank.NINE, PlayingCard.Suit.HEARTS), new PlayingCard(PlayingCard.Rank.TWO, PlayingCard.Suit.SPADES)); Assert.AreEqual(expected, actual, "Not same type"); } }