示例#1
0
            public override void Context()
            {
                _expectedResults        = new[] { mock <IArgumentSpecification>(), mock <IArgumentSpecification>() };
                _arguments              = new object[] { 1, "fred" };
                _parameterInfos         = new[] { mock <IParameterInfo>(), mock <IParameterInfo>() };
                _argumentSpecifications = new List <IArgumentSpecification>
                {
                    mock <IArgumentSpecification>(),
                    mock <IArgumentSpecification>()
                };
                _argumentSpecificationFactory = mock <IArgumentSpecificationFactory>();
                var suppliedArgumentSpecifications = mock <ISuppliedArgumentSpecifications>();

                _suppliedArgumentSpecificationsFactory = mock <ISuppliedArgumentSpecificationsFactory>();
                _suppliedArgumentSpecificationsFactory.stub(x => x.Create(_argumentSpecifications)).Return(suppliedArgumentSpecifications);
                _argumentSpecificationFactory.stub(x => x.Create(_arguments[0], _parameterInfos[0], suppliedArgumentSpecifications)).Return(_expectedResults[0]);
                _argumentSpecificationFactory.stub(x => x.Create(_arguments[1], _parameterInfos[1], suppliedArgumentSpecifications)).Return(_expectedResults[1]);
            }
 public MixedArgumentSpecificationsFactory(IArgumentSpecificationFactory argumentSpecificationFactory, ISuppliedArgumentSpecificationsFactory suppliedArgumentSpecificationsFactory)
 {
     _argumentSpecificationFactory          = argumentSpecificationFactory;
     _suppliedArgumentSpecificationsFactory = suppliedArgumentSpecificationsFactory;
 }
 public CallSpecificationFactory(IArgumentSpecificationFactory argumentSpecificationFactory)
 {
     _argumentSpecificationFactory = argumentSpecificationFactory;
 }
 public MixedArgumentSpecificationsFactory(IArgumentSpecificationFactory argumentSpecificationFactory, ISuppliedArgumentSpecificationsFactory suppliedArgumentSpecificationsFactory)
 {
     _argumentSpecificationFactory = argumentSpecificationFactory;
     _suppliedArgumentSpecificationsFactory = suppliedArgumentSpecificationsFactory;
 }