コード例 #1
0
 public void StartSetForProxy()
 {
     IDataProvider dp = new RamDataProvider();
     dp.AddItems(AddedItems);
     IDataProvider proxy = new DataProviderProxy(dp);
     Assert.AreEqual(dp.Items.Length, proxy.Items.Length);
 }
コード例 #2
0
 public void ClearTest()
 {
     IDataProvider dp = new RamDataProvider();
     dp.AddItems(AddedItems);
     Assert.AreEqual(AddedItems.Length, dp.Items.Length);
     dp.Clear();
     Assert.AreEqual(0, dp.Items.Length);
 }
コード例 #3
0
 public void AddContaintsItemTest()
 {
     IDataProvider dp = new RamDataProvider();
     dp.AddItems(AddedItems);
     int countBefore = dp.Items.Length;
     dp.AddItems(AddedItems);
     int countAfter = dp.Items.Length;
     Assert.AreEqual(0, countAfter - countBefore);
 }
コード例 #4
0
 public void AddNewItemTest()
 {
     IDataProvider dp = new RamDataProvider();
     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);
 }
コード例 #5
0
 public void FindItemsTest()
 {
     IDataProvider dp = new RamDataProvider();
     dp.AddItems(AddedItems);
     Assert.AreEqual(2, dp.Search("a").Length);
 }
コード例 #6
0
 public void AddItemsTest()
 {
     IDataProvider dp = new RamDataProvider();
     dp.AddItems(AddedItems);
     Assert.AreEqual(4, dp.Items.Length);
 }