diff options
author | Jon Skeet <skeet@pobox.com> | 2016-04-20 09:01:58 +0100 |
---|---|---|
committer | Jon Skeet <skeet@pobox.com> | 2016-04-20 09:01:58 +0100 |
commit | f265fb8152ae5f7647f876c5539f3ed174673cb2 (patch) | |
tree | e30e4012a829a2597b25a32664fd02c79052741a /csharp/src/Google.Protobuf.Test/JsonParserTest.cs | |
parent | 36978c39388e4dedc7d6ee88aa38b81bcee50ced (diff) | |
parent | d90d615f716c6d2f0ede2b2ce23705d4c502ea45 (diff) | |
download | protobuf-f265fb8152ae5f7647f876c5539f3ed174673cb2.tar.gz protobuf-f265fb8152ae5f7647f876c5539f3ed174673cb2.tar.bz2 protobuf-f265fb8152ae5f7647f876c5539f3ed174673cb2.zip |
Merge pull request #1401 from jskeet/enum-casing
Enum casing in C#
Diffstat (limited to 'csharp/src/Google.Protobuf.Test/JsonParserTest.cs')
-rw-r--r-- | csharp/src/Google.Protobuf.Test/JsonParserTest.cs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/csharp/src/Google.Protobuf.Test/JsonParserTest.cs b/csharp/src/Google.Protobuf.Test/JsonParserTest.cs index d21da58a..684f52b4 100644 --- a/csharp/src/Google.Protobuf.Test/JsonParserTest.cs +++ b/csharp/src/Google.Protobuf.Test/JsonParserTest.cs @@ -142,8 +142,8 @@ namespace Google.Protobuf [TestCase(typeof(DoubleValue), "1.5", 1.5d)] public void Wrappers_Standalone(System.Type wrapperType, string json, object expectedValue) { - IMessage parsed = (IMessage) Activator.CreateInstance(wrapperType); - IMessage expected = (IMessage) Activator.CreateInstance(wrapperType); + IMessage parsed = (IMessage)Activator.CreateInstance(wrapperType); + IMessage expected = (IMessage)Activator.CreateInstance(wrapperType); JsonParser.Default.Merge(parsed, "null"); Assert.AreEqual(expected, parsed); @@ -640,7 +640,7 @@ namespace Google.Protobuf var parsed = Timestamp.Parser.ParseJson(json); Assert.AreEqual(WrapInQuotes(expectedFormatted), parsed.ToString()); } - + [Test] [TestCase("2015-10-09 14:46:23.123456789Z", Description = "No T between date and time")] [TestCase("2015/10/09T14:46:23.123456789Z", Description = "Wrong date separators")] @@ -886,9 +886,9 @@ namespace Google.Protobuf } [Test] - [TestCase("\"FOREIGN_BAR\"", ForeignEnum.FOREIGN_BAR)] - [TestCase("5", ForeignEnum.FOREIGN_BAR)] - [TestCase("100", (ForeignEnum) 100)] + [TestCase("\"FOREIGN_BAR\"", ForeignEnum.ForeignBar)] + [TestCase("5", ForeignEnum.ForeignBar)] + [TestCase("100", (ForeignEnum)100)] public void EnumValid(string value, ForeignEnum expectedValue) { string json = "{ \"singleForeignEnum\": " + value + " }"; @@ -922,4 +922,4 @@ namespace Google.Protobuf return '"' + text + '"'; } } -} +}
\ No newline at end of file |