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