public void SpanShouldStartAfterChildNodes() { // Arrange var childNode = new CharacterNode('a'); var target = new QuantifierNMNode(5, 10, childNode); // Act var(Start, Length) = target.GetSpan(); // Assert Start.ShouldBe(childNode.ToString().Length); Length.ShouldBe(6); }
public void SpanShouldStartAfterPrefix() { // Arrange var childNode = new CharacterNode('a'); var prefix = new CommentGroupNode("X"); var target = new QuantifierNMNode(5, 10, childNode) { Prefix = prefix }; // Act var(Start, Length) = target.GetSpan(); // Assert Start.ShouldBe(6); Length.ShouldBe(6); }