public void CallBaseMethod_should_call_Proceed_on_invocation() { var invokation = A.Fake <IInvocation>(); Fake.Configure(invokation).CallsTo(x => x.Arguments).Returns(new object[] { }); Fake.Configure(invokation).CallsTo(x => x.Method).Returns(typeof(IFoo).GetMethod("Bar", new Type[] { })); var adapter = new InvocationCallAdapter(invokation); adapter.CallBaseMethod(); Fake.Assert(invokation).WasCalled(x => x.Proceed()); }
public void CallBaseMethod_should_call_Proceed_on_invokation() { var invokation = A.Fake <IInvocation>(); A.CallTo(() => invokation.Arguments).Returns(new object[] { }); A.CallTo(() => invokation.Method).Returns(typeof(IFoo).GetMethod("Bar", new Type[] { })); var adapter = new InvocationCallAdapter(invokation); adapter.CallBaseMethod(); A.CallTo(() => invokation.Proceed()).MustHaveHappened(Repeated.Once); }