public ParamsArgumentSpecificationFactory(IDefaultChecker defaultChecker,
                                         IArgumentEqualsSpecificationFactory argumentEqualsSpecificationFactory,
                                         IArrayArgumentSpecificationsFactory arrayArgumentSpecificationsFactory,
                                         IParameterInfosFromParamsArrayFactory parameterInfosFromParamsArrayFactory,
                                         ISuppliedArgumentSpecificationsFactory suppliedArgumentSpecificationsFactory,
                                         IArrayContentsArgumentSpecificationFactory arrayContentsArgumentSpecificationFactory)
 {
     _defaultChecker = defaultChecker;
     _argumentEqualsSpecificationFactory = argumentEqualsSpecificationFactory;
     _arrayArgumentSpecificationsFactory = arrayArgumentSpecificationsFactory;
     _parameterInfosFromParamsArrayFactory = parameterInfosFromParamsArrayFactory;
     _suppliedArgumentSpecificationsFactory = suppliedArgumentSpecificationsFactory;
     _arrayContentsArgumentSpecificationFactory = arrayContentsArgumentSpecificationFactory;
 }
Пример #2
0
 public ParamsArgumentSpecificationFactory(IDefaultChecker defaultChecker,
                                           IArgumentEqualsSpecificationFactory argumentEqualsSpecificationFactory,
                                           IArrayArgumentSpecificationsFactory arrayArgumentSpecificationsFactory,
                                           IParameterInfosFromParamsArrayFactory parameterInfosFromParamsArrayFactory,
                                           ISuppliedArgumentSpecificationsFactory suppliedArgumentSpecificationsFactory,
                                           IArrayContentsArgumentSpecificationFactory arrayContentsArgumentSpecificationFactory)
 {
     _defaultChecker = defaultChecker;
     _argumentEqualsSpecificationFactory        = argumentEqualsSpecificationFactory;
     _arrayArgumentSpecificationsFactory        = arrayArgumentSpecificationsFactory;
     _parameterInfosFromParamsArrayFactory      = parameterInfosFromParamsArrayFactory;
     _suppliedArgumentSpecificationsFactory     = suppliedArgumentSpecificationsFactory;
     _arrayContentsArgumentSpecificationFactory = arrayContentsArgumentSpecificationFactory;
 }
 public override void Context()
 {
     base.Context();
     _argument      = new[] { "one", "two", "three" };
     _parameterInfo = mock <IParameterInfo>();
     _parameterInfo.stub(x => x.ParameterType).Return(typeof(string[]));
     _argumentEqualsSpecificationFactory        = mock <IArgumentEqualsSpecificationFactory>();
     _arrayArgumentSpecificationsFactory        = mock <IArrayArgumentSpecificationsFactory>();
     _parameterInfosFromParamsArrayFactory      = mock <IParameterInfosFromParamsArrayFactory>();
     SuppliedArgumentSpecificationsFactory      = mock <ISuppliedArgumentSpecificationsFactory>();
     _arrayContentsArgumentSpecificationFactory = mock <IArrayContentsArgumentSpecificationFactory>();
     _defaultChecker = mock <IDefaultChecker>();
     _argumentSpecificationsToSupply = new Queue <IArgumentSpecification>();
     _suppliedArgumentSpecifications = mock <ISuppliedArgumentSpecifications>();
     _suppliedArgumentSpecifications.stub(x => x.Dequeue()).Return(null).WhenCalled(x => x.ReturnValue          = _argumentSpecificationsToSupply.Dequeue());
     _suppliedArgumentSpecifications.stub(x => x.DequeueRemaining()).Return(null).WhenCalled(x => x.ReturnValue = _argumentSpecificationsToSupply);
 }
Пример #4
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 MixedArgumentSpecificationsFactory(IArgumentSpecificationFactory argumentSpecificationFactory, ISuppliedArgumentSpecificationsFactory suppliedArgumentSpecificationsFactory)
 {
     _argumentSpecificationFactory = argumentSpecificationFactory;
     _suppliedArgumentSpecificationsFactory = suppliedArgumentSpecificationsFactory;
 }