|
From: Joe W. <jo...@tr...> - 2003-06-01 08:10:30
|
Thanks Jeremy - I'll look into this.
I noticed that your testcase extends Assertion - I presume this is so
it's easier to use use AssertBlah methods. Is this a pattern you use
frequently? Does anyone else do this?
-joe
Jeremy Stell-Smith wrote:
>hey guys, got another bug report/feature request.
>
>basically nmock croaks when trying to mock an
>interface that subclasses another one
>
>Jeremy
>
>PS sorry about the foo's joe :)
>
>using NMock;
>using NUnit.Framework;
>
>[TestFixture]
>public class NMockTest : Assertion
>{
> public interface ISuperFoo
> {
> string GetSuperString();
> }
>
> public interface IFoo : ISuperFoo
> {
> }
>
> [Test]
> public void MockingMembersFromBaseInterfaces()
> {
> IMock mock = new DynamicMock(typeof(IFoo));
> mock.ExpectAndReturn("GetSuperString", "some
>string");
>
> IFoo foo = (IFoo) mock.MockInstance;
>
> AssertEquals("some string",
>foo.GetSuperString());
> }
>}
>
>
>__________________________________
>Do you Yahoo!?
>The New Yahoo! Search - Faster. Easier. Bingo.
>http://search.yahoo.com
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: eBay
>Get office equipment for less on eBay!
>http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
>_______________________________________________
>Nmock-general mailing list
>Nmo...@li...
>https://lists.sourceforge.net/lists/listinfo/nmock-general
>
>
|