[Test] public void CanBeCustomisedByOverridingCallMethod() { IMock mock = new CustomMock(typeof(IBlah)); IBlah blah = (IBlah)mock.MockInstance; Assertion.AssertEquals("CUSTOM", blah.DoStuff("hello")); mock.Verify(); }
[Test] public void NamedDynamicMockImplementsAnInterface() { IMock mock = new DynamicMock(typeof(IBlah), "XBlah"); mock.ExpectAndReturn("DoStuff", "world", "hello"); IBlah blah = (IBlah)mock.MockInstance; Assertion.AssertEquals("world", blah.DoStuff("hello")); mock.Verify(); }