Пример #1
0
 public void DeleteAllTest()
 {
     var target = new BaseArray<int>();
     target.AddRecord(1);
     target.AddRecord(2);
     target.AddRecord(3);
     Assert.AreEqual(3, target.Count());
     target.DeleteAll();
     Assert.AreEqual(0, target.Count());
 }
Пример #2
0
 public void DeleteRecordTest()
 {
     var target = new BaseArray<int>();
     const int nIndex = 0;
     target.AddRecord(1);
     target.AddRecord(2);
     target.AddRecord(3);
     target.DeleteRecord(nIndex);
     Assert.AreEqual(2, target.Count());
     target.SetCurrent(0);
     Assert.AreEqual(2, target.Current);
 }
Пример #3
0
 public void CurrentTest()
 {
     var target = new BaseArray<string>();
     target.AddRecord("test");
     const string val = "test";
     Assert.AreEqual(val, target.Current, "Kfd.Tools.BaseArray<T>.Current was not set correctly.");
 }
Пример #4
0
 public void GetEnumeratorTest()
 {
     var target = new BaseArray<int>();
     target.AddRecord(1);
     target.AddRecord(2);
     target.AddRecord(3);
     const int expected = 3;
     int actual = target.Count();
     Assert.AreEqual(expected, actual, "Kfd.Tools.BaseArray<T>.GetEnumerator did not return the expected value.");
 }
Пример #5
0
 public void GetCountTest()
 {
     var target = new BaseArray<int>();
     target.AddRecord(1);
     target.AddRecord(2);
     target.AddRecord(3);
     Assert.AreEqual(3, target.Count());
 }