diff options
author | Jon Skeet <jonskeet@google.com> | 2016-01-06 11:12:56 +0000 |
---|---|---|
committer | Jon Skeet <jonskeet@google.com> | 2016-01-13 10:58:49 +0000 |
commit | 5dba7d7b4cac6f2f4250ceaca27fb6024f4aeb54 (patch) | |
tree | 4f84548fb0fa879746030e56395d4e87bb6bffa0 /csharp/src/Google.Protobuf.Test/JsonParserTest.cs | |
parent | 73c003c309235485c0e53f2075242567c88a72bc (diff) | |
download | protobuf-5dba7d7b4cac6f2f4250ceaca27fb6024f4aeb54.tar.gz protobuf-5dba7d7b4cac6f2f4250ceaca27fb6024f4aeb54.tar.bz2 protobuf-5dba7d7b4cac6f2f4250ceaca27fb6024f4aeb54.zip |
Introduce ICustomDiagnosticMessage to allow for custom string formatting
This fixes issue #933, effectively.
Diffstat (limited to 'csharp/src/Google.Protobuf.Test/JsonParserTest.cs')
-rw-r--r-- | csharp/src/Google.Protobuf.Test/JsonParserTest.cs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/csharp/src/Google.Protobuf.Test/JsonParserTest.cs b/csharp/src/Google.Protobuf.Test/JsonParserTest.cs index 303baacc..4443ab4a 100644 --- a/csharp/src/Google.Protobuf.Test/JsonParserTest.cs +++ b/csharp/src/Google.Protobuf.Test/JsonParserTest.cs @@ -182,7 +182,7 @@ namespace Google.Protobuf private static void AssertRoundtrip<T>(T message) where T : IMessage<T>, new() { var clone = message.Clone(); - var json = message.ToString(); + var json = JsonFormatter.Default.Format(message); var parsed = JsonParser.Default.Parse<T>(json); Assert.AreEqual(clone, parsed); } |