|
From: Vaughn, C. <Va...@va...> - 2003-07-22 12:49:33
|
Thanx Joe,
I've been hacking at it, but my change required using the "get_/set_"
prefix. I've discovered some more things and I've hacked the code to try to
address them. Here are both the tests and the hacked code. I'm sure you'll
discover other bugs as I did when I tried to get this to work. One is in
MockCall.checkArguments. Your HasExpectations is only true if you expect
args. This is bad if you're testing a function with no args. If you have
any questions on anything, just let me know.
cliff
cliff
-----Original Message-----
From: Joe Walnes [mailto:jo...@tr...]
Sent: Tuesday, July 22, 2003 4:16 AM
To: Vaughn, Clifton
Cc: 'Nmo...@li...'
Subject: Re: [Nmock-general] properties
Cliff,
This is an awkward little bug you've discovered. It's caused by the fact
that NMock has no support for overloads and treats the following two
methods as the same:
void Name(string name);
String Name();
I shall try to get a fix together asap.
Thanks
-Joe
Vaughn, Clifton wrote:
>Hello all,
>
>Any reason why this test doesn't pass? I think it should.
>
>
> public interface IFoo
> {
> string Name { get; set; }
> }
>
> public void TestInit()
> {
> DynamicMock foo = new DynamicMock( typeof( IFoo ) );
> IFoo ifoo = ((IFoo)foo.MockInstance);
> foo.SetupResult( "Name", "bob" );
> foo.Expect( "Name", "bill" );
>
> System.Diagnostics.Debug.Write( ifoo.Name );
> ifoo.Name = "bill";
> foo.Verify();
> }
>
>cliff
>
>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.
>
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: VM Ware
>With VMware you can run multiple operating systems on a single machine.
>WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
>same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
>_______________________________________________
>Nmock-general mailing list
>Nmo...@li...
>https://lists.sourceforge.net/lists/listinfo/nmock-general
>
>
|