示例#1
0
        public List <Card> FindCard(string searchText)
        {
            ICardRepository cr  = new CardRepository();
            var             ret = cr.FindCard(searchText);

            return(ret == null ? new List <Card>() : ret.ToList());
        }
示例#2
0
        public void CandFindCard()
        {
            var card = new Card {
                Name = "White Knight", CastingCost = "WW", Type = "Creature - Knight"
            };
            ICardRepository repository = new CardRepository();

            repository.Add(card);

            var fromDb = repository.FindCard("White");

            Assert.IsNotNull(fromDb);
            Assert.AreNotEqual(fromDb.Count, 0);
        }