public void ToStringShouldReturnQuantifierNMOfIntegersNAndMIfNoOriginalNAndMIsGiven() { // Arrange var characterNode = new CharacterNode('a'); var target = new QuantifierNMNode(5, 6, characterNode); // Act var result = target.ToString(); // Assert result.ShouldBe("a{5,6}"); }
public void ToStringShouldReturnOriginalQuantifierNMOnChildNodeToString() { // Arrange var characterNode = new CharacterNode('a'); var target = new QuantifierNMNode("05", "006", characterNode); // Act var result = target.ToString(); // Assert result.ShouldBe("a{05,006}"); }
public void ToStringOnQuantifierWithPrefixShouldReturnPrefixBeforeOriginalQuantifierAndAfterQuantifiersChildNode() { // Arrange var comment = new CommentGroupNode("This is a comment."); var characterNode = new CharacterNode('a'); var target = new QuantifierNMNode("05", "006", characterNode) { Prefix = comment }; // Act var result = target.ToString(); // Assert result.ShouldBe("a(?#This is a comment.){05,006}"); }