|
From: Steve M. <Ste...@mp...> - 2004-08-12 02:39:08
|
I am getting an ExecutionEngine exception when attempting to execute a =
method off a mock instance with a ref parameter.
The simplest case I can show is:
public interface IFoo
{
void DoSomething(ref string s);
}
[Test]
public void TestSomething()
{
DynamicMock mock =3D new DynamicMock(typeof(IFoo));
IFoo foo =3D (IFoo)mock.MockInstance;
string testString =3D "";
foo.DoSomething(ref testString);
}
Now, am I doing something wrong, or is this simply not supported? I've =
looked at the code, and frankly I'm just not well versed enough with the =
IL code to even know where to start.
When stepping through the code in the debugger, it seems that the =
generator is not being called, yet the mockInstance is still being set =
to a System.Object instance somehow.
|