|
From: Vaughn, C. <Va...@va...> - 2003-08-22 09:20:21
|
Hey Steve,
the problem was that structs were being returned with junk data, but I just
checked out Tim's code and that addressed it.
The other thing I noticed is that the patch that's on the site that
addresses a bug with checking return types in
DynamicMock.checkReturnTypeIsValid doesn't seem to be incorporated in the
CVS source tree. It's a good fix and should be in there.
cliff
>Fixed it last night (in CVS). What's the error you're getting with this
>code?
>S.
Vaughn, Clifton wrote:
> Hey,
>
> I looks like someone beat me to the internal method bug. The only thing I
> can't seem to get working in my code is this test.
>
> public interface IFoo2
> {
> System.Drawing.Color color { get; }
> DateTime date { get; }
> System.Int32 anint { get; }
> System.Object anobj { get; }
> }
>
> public void TestColor()
> {
> IMock foo = new DynamicMock( typeof( IFoo2 ) );
> foo.ExpectAndReturn( "color",
> System.Drawing.Color.Black );
> foo.ExpectAndReturn( "date", DateTime.Now.Date );
> System.Drawing.Color c =
> ((IFoo2)foo.MockInstance).color;
> DateTime d = ((IFoo2)foo.MockInstance).date;
>
> Assertion.AssertEquals( "color",
> System.Drawing.Color.Black, c );
> Assertion.AssertEquals( "date", DateTime.Now.Date, d
> );
> }
>
> I've studied the ClassGenerator, cruised the web, and tried all kinds of
> hacks and I can't get it to work. Can someone please help me out with
this?
>
>
> Clifton F. Vaughn
> Senior Business Analyst
> Information Technology
> Valassis / IT Division
> 19975 Victor Parkway Livonia, MI 48152
> Tel 734.591.3000 Ext. 16726 Fax 734.632.6151
> va...@va...
> www.valassis.com
>
> This message may have included proprietary or protected information. This
> message and the information contained herein are not to be further
> communicated without my express written consent.
>
>
|