Ejemplo n.º 1
0
        public void TestGetCards()
        {
            var crdsLst = new List <Card>()
            {
                new Card()
                {
                    cardType = CardType.Spade, id = "2Spade", num = 2
                },
                new Card()
                {
                    cardType = CardType.Heart, id = "7Heart", num = 7
                },
                new Card()
                {
                    cardType = CardType.Club, id = "8Club", num = 8
                },
                new Card()
                {
                    cardType = CardType.Diamond, id = "5Diamond", num = 5
                }
            };


            mockICards.Setup(m => m.GetCards(It.IsAny <int>())).Returns(crdsLst);
            ICards crds     = mockICards.Object;
            var    lstCards = crds.GetCards(4);

            Assert.IsNotNull(lstCards);
            Assert.AreEqual(lstCards.Count, 4);
        }