aboutsummaryrefslogtreecommitdiffhomepage
path: root/csharp/src/Google.Protobuf.Test/JsonParserTest.cs
diff options
context:
space:
mode:
authorGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2016-01-19 19:38:16 -0800
committerGravatar Jan Tattermusch <jtattermusch@users.noreply.github.com>2016-01-19 19:38:16 -0800
commit8c5260b21bb0e217e91375893d507a0ef6578d67 (patch)
tree1c72120a82fab876f5713a97f2fde16910fef05a /csharp/src/Google.Protobuf.Test/JsonParserTest.cs
parent6794d17c948f1b36d8e77a91568a40456ec8ada3 (diff)
parent5dba7d7b4cac6f2f4250ceaca27fb6024f4aeb54 (diff)
Merge pull request #1096 from jskeet/custom-to-string
Introduce ICustomDiagnosticMessage to allow for custom string formatting
Diffstat (limited to 'csharp/src/Google.Protobuf.Test/JsonParserTest.cs')
-rw-r--r--csharp/src/Google.Protobuf.Test/JsonParserTest.cs2
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 612a7b12..c4f6dfb4 100644
--- a/csharp/src/Google.Protobuf.Test/JsonParserTest.cs
+++ b/csharp/src/Google.Protobuf.Test/JsonParserTest.cs
@@ -230,7 +230,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);
}