Esempio n. 1
0
        public void HaveOneCardReturnsCardAsString()
        {
            var card = new Card(Rank.Ace, Suit.Clubs);

            var hand = new Hand();
            hand.AddCard(card);
            Assert.AreEqual(hand.ToString(), card.ToString());
        }
Esempio n. 2
0
        public void HaveTwoCardsReturnsTwoCommaSeparatedCardsInAscendingOrderAsString()
        {
            var card1 = new Card(Rank.Three, Suit.Clubs);
            var card2 = new Card(Rank.Two, Suit.Clubs);

            var hand = new Hand();
            hand.AddCard(card1);
            hand.AddCard(card2);
            Assert.AreEqual(hand.ToString(), card2.ToString() + ", " + card1.ToString());
        }
Esempio n. 3
0
 public void ReturnsAceOfClubsString()
 {
     var card = new Card(Rank.Ace, Suit.Clubs);
     var result = card.ToString();
     Assert.AreEqual(result, "A♣");
 }
Esempio n. 4
0
 public void ReturnTwoOfHeartsString()
 {
     var card = new Card(Rank.Two, Suit.Hearts);
     var result = card.ToString();
     Assert.AreEqual(result, "2♥");
 }
Esempio n. 5
0
 public void ReturnsTenOfDiamondsString()
 {
     var card = new Card(Rank.Ten, Suit.Diamonds);
     var result = card.ToString();
     Assert.AreEqual(result, "10♦");
 }
Esempio n. 6
0
 public void ReturnsKingOfSpadesString()
 {
     var card = new Card(Rank.Ten, Suit.Spades);
     var result = card.ToString();
     Assert.AreEqual(result, "10♠");
 }