public virtual void hasStraightFlushTest() { Card[] cardsOnTable = new Card[] { new Card(4, Card.Suit.CLUB), new Card(5, Card.Suit.CLUB), new Card(12, Card.Suit.CLUB), new Card(8, Card.Suit.CLUB), new Card(8, Card.Suit.DIAMOND) }; PlayerHand hand = new PlayerHand(new Card(6, Card.Suit.CLUB), new Card(7, Card.Suit.CLUB)); CardAnalyzer analyzer = new CardAnalyzer(); analyzer.setCardArray(cardsOnTable); analyzer.setHand(hand); Assert.AreEqual(CardAnalyzer.HandRank.StraightFlush, analyzer.analyze()); }
public virtual void noRoyalFlush2Test() { Card[] cardsOnTable = new Card[] { new Card(10, Card.Suit.CLUB), new Card(11, Card.Suit.CLUB), new Card(12, Card.Suit.CLUB), new Card(13, Card.Suit.CLUB), new Card(8, Card.Suit.DIAMOND) }; PlayerHand hand = new PlayerHand(new Card(6, Card.Suit.HEART), new Card(7, Card.Suit.CLUB)); CardAnalyzer analyzer = new CardAnalyzer(); analyzer.setCardArray(cardsOnTable); analyzer.setHand(hand); Assert.AreNotEqual(CardAnalyzer.HandRank.RoyalFlush, analyzer.analyze()); }
//ORIGINAL LINE: @Test public void highStraightAnalyzeTest() public virtual void highStraightAnalyzeTest() { Card[] cardsOnTable = new Card[] { new Card(1, Card.Suit.CLUB), new Card(3, Card.Suit.CLUB), new Card(12, Card.Suit.CLUB), new Card(2, Card.Suit.CLUB), new Card(11, Card.Suit.DIAMOND) }; PlayerHand hand = new PlayerHand(new Card(10, Card.Suit.HEART), new Card(13, Card.Suit.HEART)); CardAnalyzer analyzer = new CardAnalyzer(); analyzer.setCardArray(cardsOnTable); analyzer.setHand(hand); Assert.AreEqual(CardAnalyzer.HandRank.Straight, analyzer.analyze()); }
//ORIGINAL LINE: @Test public void noTwoPairTest() public virtual void noTwoPairTest() { Card[] cardsOnTable = new Card[] { new Card(4, Card.Suit.CLUB), new Card(5, Card.Suit.CLUB), new Card(12, Card.Suit.CLUB), new Card(2, Card.Suit.CLUB), new Card(8, Card.Suit.DIAMOND) }; PlayerHand hand = new PlayerHand(new Card(8, Card.Suit.CLUB), new Card(7, Card.Suit.CLUB)); CardAnalyzer analyzer = new CardAnalyzer(); analyzer.setCardArray(cardsOnTable); analyzer.setHand(hand); Assert.AreNotEqual(CardAnalyzer.HandRank.TwoPair, analyzer.analyze()); }
//ORIGINAL LINE: @Test public void hasThreeOfAKindTest() public virtual void hasThreeOfAKindTest() { Card[] cardsOnTable = new Card[] { new Card(4, Card.Suit.CLUB), new Card(5, Card.Suit.CLUB), new Card(12, Card.Suit.CLUB), new Card(8, Card.Suit.CLUB), new Card(8, Card.Suit.DIAMOND) }; PlayerHand hand = new PlayerHand(new Card(8, Card.Suit.HEART), new Card(10, Card.Suit.SPADE)); CardAnalyzer analyzer = new CardAnalyzer(); analyzer.setCardArray(cardsOnTable); analyzer.setHand(hand); Assert.AreEqual(CardAnalyzer.HandRank.ThreeOfAKind, analyzer.analyze()); }
public virtual void noFullHouseTest() { Card[] cardsOnTable = new Card[] { new Card(4, Card.Suit.CLUB), new Card(5, Card.Suit.CLUB), new Card(4, Card.Suit.HEART), new Card(4, Card.Suit.DIAMOND), new Card(6, Card.Suit.HEART) }; PlayerHand hand = new PlayerHand(new Card(7, Card.Suit.CLUB), new Card(8, Card.Suit.CLUB)); CardAnalyzer analyzer = new CardAnalyzer(); analyzer.setCardArray(cardsOnTable); analyzer.setHand(hand); Assert.AreNotEqual(CardAnalyzer.HandRank.FullHouse, analyzer.analyze()); }