public override void Context() { base.Context(); var methodInfo = ReflectionHelper.GetMethod(() => SampleMethod()); var arguments = new[] { new object() }; _call = CreateStubCall(methodInfo, arguments); _call.stub(x => x.GetArgumentSpecifications()).Return(mock <IList <IArgumentSpecification> >()); _argumentSpecificationsFactory = mock <IArgumentSpecificationsFactory>(); _argSpecsFromFactory = new[] { mock <IArgumentSpecification>(), mock <IArgumentSpecification>() }; _argumentSpecificationsFactory .Stub(x => x.Create( _call.GetArgumentSpecifications(), _call.GetArguments(), _call.GetParameterInfos(), _argMatching)) .Return(_argSpecsFromFactory); }
public CallSpecificationFactory(IArgumentSpecificationsFactory argumentSpecificationsFactory) { _argumentSpecificationsFactory = argumentSpecificationsFactory; }