File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
ClassLibraries/Macross.Json.Extensions/Test Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -299,7 +299,7 @@ public void JsonStringEnumMemberConverterOptionsAttributeOverrideTest()
299299 Converters = { new JsonStringEnumMemberConverter ( new JsonStringEnumMemberConverterOptions ( deserializationFailureFallbackValue : 1 ) ) }
300300 } ;
301301
302- JsonSerializer . Deserialize < EnumWithAttributeOptions > ( @"""invalid_json""" , options ) ;
302+ JsonSerializer . Deserialize < EnumWithOptionsAttribute > ( @"""invalid_json""" , options ) ;
303303 }
304304
305305 [ TestMethod ]
@@ -404,23 +404,25 @@ public enum EnumDefinition
404404 Second ,
405405 }
406406
407- private class ValidJsonNamingPolicy : JsonNamingPolicy
407+ #pragma warning disable CA1034 // Nested types should not be visible
408+ public class ValidJsonNamingPolicy : JsonNamingPolicy
408409 {
409410 public override string ConvertName ( string name ) => throw new NotImplementedException ( ) ;
410411 }
411412
412- private class InvalidJsonNamingPolicy : JsonNamingPolicy
413+ public class InvalidJsonNamingPolicy : JsonNamingPolicy
413414 {
414415 private InvalidJsonNamingPolicy ( )
415416 {
416417 }
417418
418419 public override string ConvertName ( string name ) => throw new NotImplementedException ( ) ;
419420 }
421+ #pragma warning restore CA1034 // Nested types should not be visible
420422
421423 [ JsonStringEnumMemberConverterOptions ( deserializationFailureFallbackValue : 99 ) ]
422424 [ JsonConverter ( typeof ( JsonStringEnumMemberConverter ) ) ]
423- private enum EnumWithAttributeOptions
425+ public enum EnumWithOptionsAttribute
424426 {
425427 One = 1 ,
426428 Two = 2
You can’t perform that action at this time.
0 commit comments