Exemple #1
0
        public void GetDeckShuffleDoesNotCreateIdenticalObject()
        {
            //Arrange
            string[] packnames =
            {
                "Hilarious!",
                "Cows Against Hamburgers - Patty Pack #1",
            };
            var dGen = new DeckGenerator();

            //Act
            Deck firstDeck  = dGen.GetDeck(packnames);
            Deck secondDeck = dGen.GetDeck(packnames);

            //Assert
            Assert.True(firstDeck != secondDeck);
        }
Exemple #2
0
        public void GetDeckShuffleChangesFirstCardOfDecks()
        {
            //Arrange
            string[] packnames =
            {
                "Hilarious!",
                "Cows Against Hamburgers - Patty Pack #1",
            };
            var dGen = new DeckGenerator();

            //Act
            Deck firstDeck  = dGen.GetDeck(packnames);
            Deck secondDeck = dGen.GetDeck(packnames);

            var card1 = firstDeck.BlackCards.First();
            var card2 = secondDeck.BlackCards.First();

            //Assert
            Assert.False(card1.Text == card2.Text);
        }
Exemple #3
0
        public void GetDeckFromPacknamesContainsCardsFromPacknames()
        {
            //Arrange
            string[] packnames =
            {
                "Hilarious!",
                "Cows Against Hamburgers - Patty Pack #1",
            };
            var dGen = new DeckGenerator();

            //Act
            Deck deck = dGen.GetDeck(packnames);

            //Assert
            Assert.Equal(packnames[0], (deck.BlackCards.First()).PackName);
        }
Exemple #4
0
        public void GetDeckFromPacknamesContainsNoEmpty()
        {
            //Arrange
            string[] packnames =
            {
                "Hilarious!",
                "Cows Against Hamburgers - Patty Pack #1",
            };
            var dGen = new DeckGenerator();

            //Act
            Deck deck = dGen.GetDeck(packnames);

            //Assert
            Assert.NotNull(deck);
        }