Skip to content

Commit

Permalink
Fix Serilog input tests
Browse files Browse the repository at this point in the history
  • Loading branch information
karolz-ms committed Mar 24, 2017
1 parent c3b4469 commit e9fff1d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public void ReportsMessageTemplate()
logger.Information(messageTemplate, "World");

observer.Verify(s => s.OnNext(It.Is<EventData>(data =>
data.Payload["Message"].Equals("Hello, World!")
data.Payload["Message"].Equals("Hello, \"World\"!")
&& data.Level == LogLevel.Informational
&& data.Payload["MessageTemplate"].Equals(messageTemplate)
)));
Expand Down Expand Up @@ -159,7 +159,7 @@ public void HandlesDuplicatePropertyNames()
observer.Verify(s => s.OnNext(It.Is<EventData>(data =>
data.Payload["Message"].Equals("I say: \"Keyser Söze\" and you pay attention, no excuses")
&& data.Payload["Exception"].Equals(e)
&& data.Payload[data.Payload.Keys.First(key => key.StartsWith("Message") && key != "Message")].Equals("Keyser Söze")
&& data.Payload[data.Payload.Keys.First(key => key.StartsWith("Message") && !key.EndsWith("Template") && key != "Message")].Equals("Keyser Söze")
&& data.Payload[data.Payload.Keys.First(key => key.StartsWith("Exception") && key != "Exception")].Equals("excuses")
)), Times.Exactly(1));

Expand Down

0 comments on commit e9fff1d

Please sign in to comment.