Example #1
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 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);
 }
 public SuppliedArgumentSpecifications(IDefaultChecker defaultChecker, IEnumerable<IArgumentSpecification> argumentSpecifications)
 {
     _defaultChecker = defaultChecker;
     _list = new List<IArgumentSpecification>(argumentSpecifications);
     _queue = new Queue<IArgumentSpecification>(_list);
 }
 public ArgumentSpecificationCompatibilityTester(IDefaultChecker defaultChecker)
 {
     _defaultChecker = defaultChecker;
 }
 public SuppliedArgumentSpecifications(IDefaultChecker defaultChecker, IEnumerable <IArgumentSpecification> argumentSpecifications)
 {
     _defaultChecker = defaultChecker;
     _list           = new List <IArgumentSpecification>(argumentSpecifications);
     _queue          = new Queue <IArgumentSpecification>(_list);
 }
 public SuppliedArgumentSpecificationsFactory(IDefaultChecker defaultChecker)
 {
     _defaultChecker = defaultChecker;
 }
 public override void Context()
 {
     ArgumentSpecifications = new List <IArgumentSpecification>();
     DefaultChecker         = mock <IDefaultChecker>();
 }
 public NonParamsArgumentSpecificationFactory(IDefaultChecker defaultChecker, IArgumentEqualsSpecificationFactory argumentEqualsSpecificationFactory)
 {
     _defaultChecker = defaultChecker;
     _argumentEqualsSpecificationFactory = argumentEqualsSpecificationFactory;
 }
Example #10
0
 public ArgumentSpecificationCompatibilityTester(IDefaultChecker defaultChecker)
 {
     _defaultChecker = defaultChecker ?? throw new ArgumentNullException(nameof(defaultChecker));
 }
 public SuppliedArgumentSpecificationsFactory(IDefaultChecker defaultChecker)
 {
     _defaultChecker = defaultChecker;
 }