Пример #1
0
        public void TestShuffle()
        {
            //arrange
            List <CardGame.Card> testdeck1 = new List <CardGame.Card>();
            List <CardGame.Card> testdeck2 = new List <CardGame.Card>();

            CardGame.Deck trial = new CardGame.Deck();
            testdeck1 = trial.GetPack();
            //act
            testdeck2 = trial.ShufflePack(trial.GetPack());
            //assert
            Assert.AreNotEqual(testdeck1, testdeck2);
        }
Пример #2
0
        public void TestSort()
        {
            //arrange
            List <CardGame.Card> testdeck1 = new List <CardGame.Card>();
            List <CardGame.Card> testdeck2 = new List <CardGame.Card>();

            CardGame.Deck trial = new CardGame.Deck();
            testdeck1 = trial.GetPack();
            //act
            testdeck2 = trial.SortPack(trial.GetPack());
            //assert
            for (int i = 0; i < testdeck1.Count; i++)
            {
                Assert.AreEqual(testdeck1[i].CardSuit, testdeck2[i].CardSuit);
                Assert.AreEqual(testdeck1[i].CardValue, testdeck2[i].CardValue);
            }
        }