public void AddContaintsItemTest() { IDataProvider dp = new DataProviderProxy(new RamDataProvider()); dp.Clear(); dp.AddItems(AddedItems); int countBefore = dp.Items.Length; dp.AddItems(AddedItems); int countAfter = dp.Items.Length; Assert.AreEqual(0, countAfter - countBefore); dp.Clear(); }
public void AddNewItemTest() { IDataProvider dp = new DataProviderProxy(new RamDataProvider()); dp.Clear(); dp.AddItems(AddedItems); int countBefore = dp.Items.Length; var newItems = new string[] { "AAA", "BBB" }; dp.AddItems(newItems); int countAfter = dp.Items.Length; Assert.AreEqual(newItems.Length, countAfter - countBefore); dp.Clear(); }
public void FindItemsTest() { IDataProvider dp = new DataProviderProxy(new RamDataProvider()); dp.Clear(); dp.AddItems(AddedItems); Assert.AreEqual(2, dp.Search("a").Length); dp.Clear(); }
public void AddItemsTest() { IDataProvider dp = new DataProviderProxy(new RamDataProvider()); dp.Clear(); dp.AddItems(AddedItems); Assert.AreEqual(4, dp.Items.Length); dp.Clear(); }