|
From: Vaughn, C. <Va...@va...> - 2003-08-04 17:18:44
|
I've made changes to FastErrorHandlingTests...
[Test]
public void ExpectWithMissingMethod()
{
try
{
empty.Expect("Foo");
Fail();
}
catch (MissingMethodException e)
{
AssertEquals("method <MockEmpty.Foo> not
defined", e.Message);
}
}
[Test]
[ExpectedException(typeof(MissingMethodException))]
public void ExpectAndReturnWithMissingMethod()
{
full.ExpectAndReturn("xxx", null);
}
[Test]
public void SetupResultWithWrongType()
{
try
{
full.SetupResult("Foo", true);
Fail();
}
catch (ArgumentException e)
{
AssertEquals("method <MockFull.Foo> returns
a System.String", e.Message);
}
}
[Test]
public void FailWhenMockedMethodNotVirtual()
{
try
{
full.Expect("Bar", "test");
Fail();
}
catch(ArgumentException e)
{
AssertEquals("method <MockFull.Bar> is not
virtual", e.Message);
}
}
Clifton F. Vaughn
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.
|