|
From: Joe W. <jo...@tr...> - 2003-07-25 16:59:52
|
It's funny you should say this. Tim Mackinnon came across the problem
with structs today - and he's fixed it.
Tim, where's our patch? ;)
-joe
Vaughn, Clifton wrote:
>I tried the following test case and i get a wierd error:
>
> public interface ITestStruct
> {
> System.Drawing.Point getPoint();
> void setPoint( System.Drawing.Point pt );
> }
> public void TestStruct()
> {
> DynamicMock foo = new DynamicMock( typeof(
>ITestStruct ));
> ITestStruct ifoo = (ITestStruct)foo.MockInstance;
> System.Drawing.Point p1 = new
>System.Drawing.Point(1,2);
> foo.ExpectAndReturn( "getPoint", p1 );
> foo.Expect( "setPoint", p1 );
>
> ifoo.setPoint( ifoo.getPoint() );
> foo.Verify();
> }
>
>c:\documents and settings\vaughnc.vci\my
>documents\dev\media\tests\tnfwmarketscontroller.cs(52):
>TargetNavigator.Tests.TNfwMarketsController.TestStruct: setPoint() called
>with incorrect parameter (1)
>expected:<{X=1,Y=2}>
> but was:<{X=322283128,Y=0}>
>
>This also happens with DateTime. Any ideas?
>
>cliff
>
>
>-------------------------------------------------------
>This SF.Net email sponsored by: Free pre-built ASP.NET sites including
>Data Reports, E-commerce, Portals, and Forums are available now.
>Download today and enter to win an XBOX or Visual Studio .NET.
>http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01
>_______________________________________________
>Nmock-general mailing list
>Nmo...@li...
>https://lists.sourceforge.net/lists/listinfo/nmock-general
>
>
|