public void Init()
        {
            _standardDeck = new StandardDeck();
            var deckCount = _standardDeck.CurrentCardCount();

            for (var i = 0; i < deckCount; i++)
            {
                _standardDeck.DrawCard();
            }
        }
        public void all_deck_cards_should_be_unique()
        {
            var fullDeck  = new List <StandardPlayingCard>();
            var deckCount = _standardDeck.CurrentCardCount();

            for (var i = 0; i < deckCount; i++)
            {
                fullDeck.Add(_standardDeck.DrawCard());
            }

            Assert.IsTrue(fullDeck.Distinct().Count() == deckCount);
        }
Example #3
0
        public void Init()
        {
            _standardDeck  = new StandardDeck();
            _fullDeckCount = _standardDeck.CurrentCardCount();

            for (var i = 0; i < 10; i++)
            {
                _standardDeck.DrawCard();
            }

            _standardDeck.RefeshDeck();
        }
 public void the_proper_exception_is_thrown()
 {
     Assert.Throws <EmptyDeckException>(() => _standardDeck.DrawCard(), "Deck does not have any cards. Refresh deck before drawing a card.");
 }