|
From: Jim A. <JA...@th...> - 2004-08-12 09:27:27
|
Yes, this is a bug (well, a limitation). I'll try and fix it today if I
get a minute.
Jim
ThoughtWorks
"Steve Mitcham" <Ste...@mp...>
Sent by: nmo...@li...
12/08/2004 03:35
To
<nmo...@li...>
cc
Subject
[Nmock-general] ExecutionEngine exception
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 = new DynamicMock(typeof(IFoo));
IFoo foo = (IFoo)mock.MockInstance;
string testString = "";
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.
-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Nmock-general mailing list
Nmo...@li...
https://lists.sourceforge.net/lists/listinfo/nmock-general
|