public void Parse_WithPlusInConcatination_ReturnsExpectedTree() { // Arrange var pattern = "ab+c"; // Act var regex = Regex.Parse(pattern); // Assert regex.Tree.AssertConcatenation( TreeAssert.Char('a'), TreeAssert.Concat( TreeAssert.Plus( TreeAssert.Char('b')), TreeAssert.Char('c'))); }
public void Parse_WithRequiredRepeatingGroupedAlternativesInConcatination_ReturnsExpectedTree() { // Arrange var pattern = "a(b|c)+d"; // Act var regex = Regex.Parse(pattern); // Assert regex.Tree.AssertConcatenation( TreeAssert.Char('a'), TreeAssert.Concat( TreeAssert.Plus( TreeAssert.Alt( TreeAssert.Char('b'), TreeAssert.Char('c'))), TreeAssert.Char('d'))); }