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
What steps will reproduce the problem?
1.
This enum:
----------
public enum EnumA
{
One,
Two,
Three
}
This class:
-----------
public class ClassD
{
private EnumA _foo;
public void SetFoo(EnumA foo)
{
_foo = foo;
}
public EnumA GetFoo()
{
return _foo;
}
}
This test:
----------
[Test]
public void Cant_deserialize_enum()
{
var value = new ClassD();
value.SetFoo(EnumA.One);
var accessor = TypeAccessor.Create(typeof(ClassD));
var accessed = accessor[value, "_foo"];
var foo = (EnumA)accessed;
}
What is the expected output? What do you see instead?
It should deserialize--flipping _foo to a public field shows correct behavior,
private results in ArgumentOutOfRangeException
What version of the product are you using? On what operating system?
Please provide any additional information below.
Original issue reported on code.google.com by daniel.crenna on 6 Apr 2014 at 4:40
The text was updated successfully, but these errors were encountered:
Should note that casting to (object) like other private value types in the unit
test suite does not work here, as we're not invoking the setter, only the
getter.
Original comment by daniel.crenna on 6 Apr 2014 at 4:41
Original issue reported on code.google.com by
daniel.crenna
on 6 Apr 2014 at 4:40The text was updated successfully, but these errors were encountered: