Esempio n. 1
0
        public void TestCardShouldCompareCorrectly_DifferentCards()
        {
            var cardA = new Card(CardFace.Jack, CardSuit.Clubs);
            var cardB = new Card(CardFace.Ace, CardSuit.Hearts);

            Assert.IsFalse(cardA.Equals(cardB));
        }
Esempio n. 2
0
        public void TestCardShouldCompareCorrectly_EqualCards()
        {
            var cardA = new Card(CardFace.Jack, CardSuit.Clubs);
            var cardB = new Card(CardFace.Jack, CardSuit.Clubs);

            Assert.IsTrue(cardA.Equals(cardB));
        }
        public void TestCardEqualWithSameFaceAndSameSuitCards()
        {
            Card firstCard = new Card(CardFace.Four, CardSuit.Clubs);
            Card secondCard = new Card(CardFace.Four, CardSuit.Clubs);

            Assert.AreEqual(firstCard.Equals(secondCard), true);
        }
        public void TestCardEqualWithSameFaceAndDifferentSuitCards()
        {
            Card firstCard = new Card(CardFace.Four, CardSuit.Hearts);
            Card secondCard = new Card(CardFace.Four, CardSuit.Clubs);

            Assert.AreEqual(firstCard.Equals(secondCard), false);
        }
        public static void Main()
        {
            ICard card = new Card(CardFace.Ace, CardSuit.Clubs);
            ICard card2 = new Card(CardFace.Ace, CardSuit.Clubs);
            Console.WriteLine(card.Equals(card2));

            /*
            IHand hand = new Hand(new List<ICard>()
            {
                new Card(CardFace.Ace, CardSuit.Clubs),
                new Card(CardFace.Ace, CardSuit.Diamonds),
                new Card(CardFace.King, CardSuit.Hearts),
                new Card(CardFace.King, CardSuit.Spades),
                new Card(CardFace.Seven, CardSuit.Diamonds),
            });
            Console.WriteLine(hand);

            IPokerHandsChecker checker = new PokerHandsChecker();
            Console.WriteLine(checker.IsValidHand(hand));
            Console.WriteLine(checker.IsOnePair(hand));
            Console.WriteLine(checker.IsTwoPair(hand));
             */
        }
Esempio n. 6
0
 public void CardShouldCompareCardsCorrectly_SameCard()
 {
     var cardA = new Card(CardFace.Ace, CardSuit.Hearts);
     var cardB = new Card(CardFace.Ace, CardSuit.Hearts);
     Assert.IsFalse(cardA.Equals(cardB));
 }
Esempio n. 7
0
 public void CardShouldCompareCardsCorrectly_DifferentCards()
 {
     var cardA = new Card(CardFace.Ace, CardSuit.Hearts);
     var cardB = new Card(CardFace.Queen, CardSuit.Spades);
     Assert.IsFalse(cardA.Equals(cardB));
 }