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