|
From: Joe W. <jo...@tr...> - 2003-02-14 20:53:13
|
Cheers - fixed!
-joe
Jeremy Stell-Smith wrote:
>I hit what I'm mostly sure is a bug. Basically, when
>you setup a return value of an enum, it doesn't work.
>Here's a failing test for y'all to fix.
>
>Jeremy
>
>
>using System;
>
>using NMock;
>using NUnit.Framework;
>
>namespace Foo
>{
> [TestFixture]
> public class FooTest : Assertion
> {
> private enum MyEnum { A, B, C, D }
>
> private interface MyInterface
> {
> MyEnum DoSomething();
> }
>
> [Test]
> public void TestReturnEnum()
> {
> DynamicMock mock = new
>DynamicMock(typeof(MyInterface));
> mock.ExpectAndReturn("DoSomething", MyEnum.A);
>
> MyInterface instance = (MyInterface)
>mock.MockInstance;
> AssertEquals(MyEnum.A, instance.DoSomething());
> }
> }
>}
>
>
>__________________________________________________
>Do you Yahoo!?
>Yahoo! Shopping - Send Flowers for Valentine's Day
>http://shopping.yahoo.com
>
>
>-------------------------------------------------------
>This SF.NET email is sponsored by: FREE SSL Guide from Thawte
>are you planning your Web Server Security? Click here to get a FREE
>Thawte SSL guide and find the answers to all your SSL security issues.
>http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
>_______________________________________________
>Nmock-general mailing list
>Nmo...@li...
>https://lists.sourceforge.net/lists/listinfo/nmock-general
>
>
|