Skip to content

Commit

Permalink
JSON Escape the strings used in test before comparing for non-English…
Browse files Browse the repository at this point in the history
… locales (#42982)
  • Loading branch information
Gnbrkm41 authored Oct 4, 2020
1 parent 7a80ffd commit 56950ad
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
using System.Globalization;
using System.IO;
using System.Linq;
using System.Text.Json;
using Microsoft.Extensions.Logging.EventSource;
using Xunit;
using Microsoft.Extensions.DependencyInjection;
Expand Down Expand Up @@ -954,7 +955,7 @@ private static class EventTypes
{ "OuterScopeStop", (e) => VerifySingleEvent(e, "Logger1", EventTypes.ActivityStop, null, null, null) },

{ "InnerScopeJsonStart", (e) => VerifySingleEvent(e, "Logger3", EventTypes.ActivityJsonStart, null, null, null,
@"""ArgumentsJson"":{""timeParam"":""" + TimeParam.ToString() + @""",""guidParam"":""" + GuidParam.ToString("D")) },
@"""ArgumentsJson"":{""timeParam"":""" + JsonEncodedText.Encode(TimeParam.ToString()).ToString() + @""",""guidParam"":""" + GuidParam.ToString("D")) },
{ "InnerScopeJsonStop", (e) => VerifySingleEvent(e, "Logger3", EventTypes.ActivityJsonStop, null, null, null) },

{ "InnerScopeStart", (e) => VerifySingleEvent(e, "Logger3", EventTypes.ActivityStart, null, null, null) },
Expand Down

0 comments on commit 56950ad

Please sign in to comment.