public void TestRemoveItem() { StoreItemRepository storeRepos = new StoreItemRepository(); List <StoreItem> list; IEnumerable <StoreItem> outItems; storeRepos.Open(); list = storeRepos.GetAll().ToList(); for (int i = 0; i < list.Count; i++) { Debug.WriteLine(list[i].Name); } Debug.WriteLine(list.Count); storeRepos.RemoveBy((i) => i.Name.ToLower().Contains("The"), out outItems); foreach (var item in outItems) { Debug.WriteLine(item.Name); } Debug.WriteLine(list.Count); storeRepos.Close(); }
public void TestAddItemToStoreRepo() { StoreItemRepository storeRepos = new StoreItemRepository(); storeRepos.Open(); storeRepos.Add(book1); storeRepos.Add(book2); storeRepos.Close(); storeRepos.Open(); storeRepos.Add(book3); }
public void TestGetItemList() { StoreItemRepository storeRepos = new StoreItemRepository(); List <StoreItem> list; storeRepos.Open(); list = storeRepos.GetAll().ToList(); for (int i = 0; i < list.Count; i++) { Debug.WriteLine(list[i].Name); } Debug.WriteLine(list.Count); storeRepos.Close(); }