コード例 #1
0
        public void CreateDeckTest_MultiDeck()
        {
            StandardDeckProvider provider = new StandardDeckProvider();
            List<StandardCard> cards = provider.OrderedSetOfCards.ToList();

            Deck<StandardCard> deck = provider.CreateDeck(3, false);
            bool isValid = IsValid_CollatedDuplication(cards, deck, 3);
            Assert.IsTrue(isValid, "The creation a deck by the StandardDeckProvier did not return a non-shuffled deck in a collated manner as expected.");

            Deck<StandardCard> shuffledDeck = provider.CreateDeck(3, true);
            bool isInvalid = !IsValid_CollatedDuplication(cards, shuffledDeck, 3);
            Assert.IsTrue(isInvalid, "The creation of a shuffled deck by the StandardDeckProvider returned a deck that was fully collated and unshuffled. This maybe possible, but winning the lottery is more likely.");
        }
コード例 #2
0
        public void CreateDeckTest_WithShuffle()
        {
            StandardDeckProvider provider = new StandardDeckProvider();
            List<StandardCard> cards = provider.OrderedSetOfCards.ToList();

            Deck<StandardCard> deck = provider.CreateDeck(3, true);
            bool isValid = IsValid_ShuffledDuplication(cards, deck, 3);
            Assert.IsTrue(isValid, "The creation a deck by the StandardDeckProvier did not return a shuffled deck.");
        }