Struct is not supported in AAA syntax-- I wonder why? Here's a simple test code to reproduce the issue:
public struct MyStruct
{
public double FirstNumber
{ get; set; }
}
[Test, Isolated]
public void SupportStruct()
{
MyStruct strtw = Isolate.Fake.Instance<MyStruct>(Members.ReturnRecursiveFakes);
Isolate.WhenCalled(()=>strtw.FirstNumber).WillReturn(10);
}
And here's the exception
failed: TypeMock.TypeMockException :
*** Can not create MockObject of struct, try using MockAll
at TypeMock.MockManager.MockObject(Type type, Constructor mockConstructors, Object[] args)
at TypeMock.MockManager.a(Type A_0, BindingFlags A_1)
at TypeMock.MockManager.CreateRecursiveFake[T](BindingFlags flags)
at cc.Instance[T](Members behavior)
________
Laser