|
From: Vaughn, C. <Va...@va...> - 2003-08-01 14:25:31
|
I think these two tests should behave the same. What do you guys think?
public interface IBar
{
string Age { get; }
string BaseCall();
}
public interface IFoo : IBar
{
string Name { get; set; }
event EventHandler Test;
void Bar();
void Bar( string text );
}
public void TestSetupResult()
{
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();
}
public void TestExpectAndReturn()
{
DynamicMock foo = new DynamicMock( typeof( IFoo ) );
IFoo ifoo = ((IFoo)foo.MockInstance);
foo.ExpectAndReturn( "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.
|