Ejemplo n.º 1
0
 public void TestHandToStringWithValidDeckButWrongFormatting2()
 {
     var cards =
         (from face in _cardFaces from suit in _cardSuits select new Card(face, suit)).Cast<ICard>().ToList();
     var hand = new PokerDemo.Hand(cards);
     Assert.AreNotEqual(string.Format("[{0}]", string.Join(" ,", cards)), hand.ToString());
 }
        public void TestHandToStringWithEmptyCardsSet()
        {
            var cards = new List <ICard>();
            var hand  = new PokerDemo.Hand(cards);

            Assert.AreEqual("[]", hand.ToString());
        }
        public void TestHandToStringWithValidDeckButWrongFormatting3()
        {
            var cards =
                (from face in _cardFaces from suit in _cardSuits select new Card(face, suit)).Cast <ICard>().ToList();
            var hand = new PokerDemo.Hand(cards);

            Assert.AreNotEqual(string.Format("[{0}]", string.Join(" , ", cards)), hand.ToString());
        }
Ejemplo n.º 4
0
 public void TestHandToStringWithOneCardSet()
 {
     var face = CardFace.Eight;
     var suit = CardSuit.Diamonds;
     var card = new Card(face, suit);
     var cards = new List<ICard> {card};
     var hand = new PokerDemo.Hand(cards);
     Assert.AreEqual(string.Format("[{0}]", card), hand.ToString());
 }
        public void TestHandToStringWithOneCardSet()
        {
            var face  = CardFace.Eight;
            var suit  = CardSuit.Diamonds;
            var card  = new Card(face, suit);
            var cards = new List <ICard> {
                card
            };
            var hand = new PokerDemo.Hand(cards);

            Assert.AreEqual(string.Format("[{0}]", card), hand.ToString());
        }
Ejemplo n.º 6
0
 public void TestHandToStringWithEmptyCardsSet()
 {
     var cards = new List<ICard>();
     var hand = new PokerDemo.Hand(cards);
     Assert.AreEqual("[]", hand.ToString());
 }