Ejemplo n.º 1
0
        public void InvalidDocumentReportsCorrectLineNumber()
        {
            var fooBarFooBar = @"
                    Foo = ""Bar""

                    Foo = ""Bar
            ".ToUnixLineEndings();

            var(_, error) = OclParser.TryExecute(fooBarFooBar);

            var expected = "Parsing failure: unexpected '\n'; expected \" (Line 4, Column 31); recently consumed: Foo = \"Bar";

            error?.Should().Be(expected);
        }
Ejemplo n.º 2
0
 public void Invalid(string input)
 {
     var(document, error) = OclParser.TryExecute(input);
     error.Should().NotBeEmpty();
     document.Should().BeNull();
 }