-Changed enum serialization in dictionary keys to use EnumMemberAttribute
This commit is contained in:
@@ -1451,10 +1451,8 @@ keyword such as type of business.""
|
||||
{
|
||||
JObject o = JObject.Parse("{'FooBarNoEnum':'SOME_OTHER_VALUE'}");
|
||||
|
||||
ExceptionAssert.Throws<ArgumentException>(() =>
|
||||
{
|
||||
o["FooBarNoEnum"].ToObject<FooBarNoEnum>();
|
||||
}, "Could not convert 'SOME_OTHER_VALUE' to FooBarNoEnum.");
|
||||
FooBarNoEnum e = o["FooBarNoEnum"].ToObject<FooBarNoEnum>();
|
||||
Assert.AreEqual(FooBarNoEnum.SomeOtherValue, e);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user