示例#1
0
 private bool VerifyException(
     JsonMasherException e, string message, int line, int column, string highlights)
 {
     e.Message.Should().Be(message);
     e.Line.Should().Be(line);
     e.Column.Should().Be(column);
     e.Highlights.CleanCR().Should().Be(highlights.CleanCR());
     return(true);
 }
示例#2
0
 private bool ValidateException(
     JsonMasherException ex,
     string expectedMessage,
     PositionInformation expectedPositionInformation)
 {
     ex.Message.Should().Be(expectedMessage);
     if (expectedPositionInformation != null)
     {
         ex.Line.Should().Be(expectedPositionInformation.Line);
         ex.Column.Should().Be(expectedPositionInformation.Column);
         ex.Highlights.CleanCR().Should().Be(expectedPositionInformation.Highlights.CleanCR());
     }
     return(true);
 }
示例#3
0
 private bool VerifyException(
     JsonMasherException ex,
     string messageExpectation,
     PositionInformation positionInformationExpectation)
 {
     ex.Message.Should().Be(messageExpectation);
     if (positionInformationExpectation != null)
     {
         ex.Line.Should().Be(positionInformationExpectation.Line);
         ex.Column.Should().Be(positionInformationExpectation.Column);
         ex.Highlights.CleanCR().Should().Be(positionInformationExpectation.Highlights.CleanCR());
     }
     return(true);
 }