Skip to content

Commit

Permalink
adding exception logging to test
Browse files Browse the repository at this point in the history
  • Loading branch information
brettsam committed Mar 8, 2018
1 parent 32d6d35 commit c2f15de
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ private void ValidateTraceProperties(TestTraceWriter trace)
else
{
int count = traceEvent.Properties.Count;
string errorMessage = $"Expected 0 properties. Actual: {count}. Message: '{traceEvent.Message}'. Properties: {Environment.NewLine}";
string errorMessage = $"Expected 0 properties. Actual: {count}. Message: '{traceEvent.Message}'. Exception: '{traceEvent.Exception?.ToString()}'. Properties: {Environment.NewLine}";
errorMessage += string.Join(Environment.NewLine, traceEvent.Properties.Select(p => $"{p.Key}: {p.Value}"));
Assert.True(count == 0, errorMessage);
}
Expand Down

0 comments on commit c2f15de

Please sign in to comment.