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()); }
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); }
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."); }
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."); }
public void GetCountTest() { var target = new BaseArray<int>(); target.AddRecord(1); target.AddRecord(2); target.AddRecord(3); Assert.AreEqual(3, target.Count()); }