Exemple #1
0
        public void ShoeTest_NoDeckDefaultsToOneDeck_Test()
        {
            int  nDecks = 0;
            Shoe shoe   = new Shoe(nDecks);

            Assert.AreEqual(52 * 1, shoe.Cards.Length);
            DeckTest.CheckPresenceOfAllCardsInOrder(shoe.Cards, 1);;
        }
Exemple #2
0
        public void ShoeTest_ShoeConstructedCorrectly_Test()
        {
            int  nDecks = 1;
            Shoe shoe   = new Shoe(nDecks);

            Assert.AreEqual(52 * nDecks, shoe.Cards.Length);
            DeckTest.CheckPresenceOfAllCardsInOrder(shoe.Cards, nDecks);

            nDecks = 8;
            shoe   = new Shoe(nDecks);
            Assert.AreEqual(52 * nDecks, shoe.Cards.Length);
            DeckTest.CheckPresenceOfAllCardsInOrder(shoe.Cards, nDecks);
        }
Exemple #3
0
        public void UtilitiesTest_Shuffle_Test()
        {
            int  nDecks = 8;
            Shoe shoe   = new Shoe(nDecks);

            Card[] cards = shoe.Cards;

            DeckTest.CheckPresenceOfAllCardsInOrder(cards, nDecks);
            string originalAllCardNames = shoe.DisplayAllCardsNames();

            Utilities.Shuffle(cards);

            string afterShuffleAllCardNames = shoe.DisplayAllCardsNames();

            Assert.AreEqual(52 * nDecks, cards.Length);
            Assert.AreNotEqual(originalAllCardNames, afterShuffleAllCardNames);
        }