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); }
public void Invalid(string input) { var(document, error) = OclParser.TryExecute(input); error.Should().NotBeEmpty(); document.Should().BeNull(); }