You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/Grpc/JsonTranscoding/src/Microsoft.AspNetCore.Grpc.JsonTranscoding/Internal/Json/JsonConverterHelper.cs
Copy file name to clipboardExpand all lines: src/Grpc/JsonTranscoding/src/Microsoft.AspNetCore.Grpc.JsonTranscoding/Internal/Json/MessageTypeInfoResolver.cs
-1Lines changed: 0 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,6 @@
1
1
// Licensed to the .NET Foundation under one or more agreements.
2
2
// The .NET Foundation licenses this file to you under the MIT license.
Copy file name to clipboardExpand all lines: src/Grpc/JsonTranscoding/test/Microsoft.AspNetCore.Grpc.JsonTranscoding.Tests/ConverterTests/JsonConverterReadTests.cs
+151-5Lines changed: 151 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -59,6 +59,40 @@ public void JsonCustomizedName()
AssertReadJsonError<HelloRequest>(json, ex =>Assert.Equal("Multiple values specified for oneof oneof_test",ex.Message.TrimEnd('.')));
486
560
}
487
561
562
+
[Fact]
563
+
publicvoidOneOf_CaseInsensitive_Failure()
564
+
{
565
+
varjson=@"{
566
+
""ONEOFNAME1"": ""test"",
567
+
""ONEOFNAME2"": ""test""
568
+
}";
569
+
570
+
AssertReadJsonError<HelloRequest>(json, ex =>Assert.Equal("Multiple values specified for oneof oneof_test",ex.Message.TrimEnd('.')),deserializeOld:false,settings:newGrpcJsonSettings{FieldNamesCaseInsensitive=true});
571
+
}
572
+
488
573
[Fact]
489
574
publicvoidNullableWrappers_NaN()
490
575
{
@@ -528,7 +613,27 @@ public void NullableWrappers()
AssertReadJsonError<FieldNameCaseMessage>(json, ex =>Assert.Equal("The JSON property name for 'Transcoding.FieldNameCaseMessage.A' collides with another property.",ex.Message),deserializeOld:false,settings:newGrpcJsonSettings{FieldNamesCaseInsensitive=true});
0 commit comments