public void EmptySourceCount() { tlog.Debug(tag, $"EmptySourceCount START"); var testingTarget = new EmptySource(); Assert.IsNotNull(testingTarget, "should be not null"); Assert.IsInstanceOf <EmptySource>(testingTarget, "should be an instance of testing target class!"); Assert.AreEqual(testingTarget.Count, 0, "Count of EmptySource should be equal to 0."); testingTarget.Dispose(); tlog.Debug(tag, $"EmptySourceCount END (OK)"); }
public void EmptySourceGetPosition() { tlog.Debug(tag, $"EmptySourceGetPosition START"); var testingTarget = new EmptySource(); Assert.IsNotNull(testingTarget, "should be not null"); Assert.IsInstanceOf <EmptySource>(testingTarget, "should be an instance of testing target class!"); Assert.AreEqual(testingTarget.GetPosition(0), -1, "The index of the first item of EmptySource should be -1."); testingTarget.Dispose(); tlog.Debug(tag, $"EmptySourceGetPosition END (OK)"); }
public void EmptySourceIsHeader() { tlog.Debug(tag, $"EmptySourceIsHeader START"); var testingTarget = new EmptySource(); Assert.IsNotNull(testingTarget, "should be not null"); Assert.IsInstanceOf <EmptySource>(testingTarget, "should be an instance of testing target class!"); testingTarget.HasHeader = true; Assert.IsTrue(testingTarget.IsHeader(0), "The first item of EmptySource should is header."); testingTarget.Dispose(); tlog.Debug(tag, $"EmptySourceIsHeader END (OK)"); }
public void EmptySourceHasFooter() { tlog.Debug(tag, $"EmptySourceHasFooter START"); var testingTarget = new EmptySource(); Assert.IsNotNull(testingTarget, "should be not null"); Assert.IsInstanceOf <EmptySource>(testingTarget, "should be an instance of testing target class!"); testingTarget.HasFooter = true; Assert.IsTrue(testingTarget.HasFooter, "EmptySource should have a footer."); testingTarget.Dispose(); tlog.Debug(tag, $"EmptySourceHasFooter END (OK)"); }
public void EmptySourceIsFooterWithHeader() { tlog.Debug(tag, $"EmptySourceIsFooterWithHeader START"); var testingTarget = new EmptySource(); Assert.IsNotNull(testingTarget, "should be not null"); Assert.IsInstanceOf <EmptySource>(testingTarget, "should be an instance of testing target class!"); testingTarget.HasHeader = true; tlog.Debug(tag, "IsFooter : " + testingTarget.IsFooter(1)); testingTarget.Dispose(); tlog.Debug(tag, $"EmptySourceIsFooterWithHeader END (OK)"); }
public void EmptySourceGetItem() { tlog.Debug(tag, $"EmptySourceGetItem START"); var testingTarget = new EmptySource(); Assert.IsNotNull(testingTarget, "should be not null"); Assert.IsInstanceOf <EmptySource>(testingTarget, "should be an instance of testing target class!"); try { var ret = testingTarget.GetItem(0); } catch (IndexOutOfRangeException e) { Assert.AreEqual(e.Message, "IItemSource is empty", "GetItem of EmptySource should not be implemented."); } testingTarget.Dispose(); tlog.Debug(tag, $"EmptySourceGetItem END (OK)"); }