Skip to content
This repository has been archived by the owner on Jul 7, 2022. It is now read-only.

Commit

Permalink
Fix broken test on Mac/Linux (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
josephwoodward authored and AnthonySteele committed May 10, 2019
1 parent efea0e6 commit f0f15f2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,12 @@ public void When_ExceptionHasStackTraceData_StackTraceIsLogged()
var result = Mapper.ToDictionary(logEventInfo);

Assert.That(result.ContainsKey("ExceptionStackTrace"), Is.True);
Assert.That(result["ExceptionStackTrace"], Does.StartWith(" at NLog.StructuredLogging.Json.Tests.Helpers.MapperExceptionLoggingTests.GenerateExceptionWithStackTrace()"));
Assert.That(NormaliseStackTrace(result["ExceptionStackTrace"].ToString()), Does.StartWith("at NLog.StructuredLogging.Json.Tests.Helpers.MapperExceptionLoggingTests.GenerateExceptionWithStackTrace()"));

string NormaliseStackTrace(string exception)
{
return exception.TrimStart(' ').Replace(" ()", "()");
}
}

[Test]
Expand Down

0 comments on commit f0f15f2

Please sign in to comment.