public void GetEnumerator_CollectionWithOneStringElement_ReturnsAnnotatedElementWithIsLastTrue() { var collection = new[] { "ELEMENT" }; var annotated = new AnnotateEnumerable <string>(collection).ToList(); Assert.That(annotated.Count, Is.EqualTo(1)); Assert.That(annotated[0].IsLast, Is.True); }
public void GetEnumerator_CollectionWithOneStringElementAndNonZeroStartIndex_ReturnsAnnotatedElementWithCorrectIndex() { var collection = new[] { "ELEMENT" }; var annotated = new AnnotateEnumerable <string>(collection, 42).ToList(); Assert.That(annotated.Count, Is.EqualTo(1)); Assert.That(annotated[0].Index, Is.EqualTo(42)); }
public void GetEnumerator_BasicTestCaseWithTwoStrings() { var collection = new[] { "A", "B" }; var annotated = new AnnotateEnumerable <string>(collection, 42).ToList(); CollectionAssert.AreEqual(new[] { new AnnotatedElement <string>(42, "A", true, null, false, "B"), new AnnotatedElement <string>(43, "B", false, "A", true, null) }, annotated, new AnnotatedElementComparer <string>()); }