public List <Card> FindCard(string searchText) { ICardRepository cr = new CardRepository(); var ret = cr.FindCard(searchText); return(ret == null ? new List <Card>() : ret.ToList()); }
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); }