|
From: Jeremy Stell-S. <ste...@ya...> - 2003-02-14 18:43:40
|
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
|