Exemple #1
0
        public void ShouldReturnNullWhenNoCardsInDeck()
        {
            _deckFiller.Setup(_ => _.Fill()).Returns(new List<Card>());
            var deck = new Deck(_deckFiller.Object);

            var card = deck.DrawCard();

            Assert.IsNull(card);
        }
Exemple #2
0
        public void ShouldReturnCardWhenDraw()
        {
            _deckFiller.Setup(_ => _.Fill()).Returns(new List<Card>
                                                             {
                                                                 new Card(CardRank.Three, CardSuit.Spade)
                                                             }
                                                     );
            var deck = new Deck(_deckFiller.Object);
            var card = deck.DrawCard();

            Assert.IsNotNull(card);
        }