예제 #1
0
파일: CardsTest.cs 프로젝트: pkb94/Cards
        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);
        }