public void SetUp ()
    {
      _involvedTypeProviderStub = MockRepository.GenerateStub<IInvolvedTypeProvider>();

      _mockRepository = new MockRepository();

      _validationCollectorProviderMock1 = _mockRepository.StrictMock<IValidationCollectorProvider>();
      _validationCollectorProviderMock2 = _mockRepository.StrictMock<IValidationCollectorProvider>();
      _validationCollectorProviderMock3 = _mockRepository.StrictMock<IValidationCollectorProvider>();
      _validationCollectorProviderMock4 = _mockRepository.StrictMock<IValidationCollectorProvider>();

      _componentValidationCollectorProvider = new AggregatingValidationCollectorProvider (
          _involvedTypeProviderStub,
          new[]
          {
              _validationCollectorProviderMock1, _validationCollectorProviderMock2,
              _validationCollectorProviderMock3, _validationCollectorProviderMock4
          });

      var componentValidationCollector = MockRepository.GenerateStub<IComponentValidationCollector>();
      _validationCollectorInfo1 = new ValidationCollectorInfo (componentValidationCollector, typeof (AggregatingValidationCollectorProvider));
      _validationCollectorInfo2 = new ValidationCollectorInfo (componentValidationCollector, typeof (AggregatingValidationCollectorProvider));
      _validationCollectorInfo3 = new ValidationCollectorInfo (componentValidationCollector, typeof (AggregatingValidationCollectorProvider));
      _validationCollectorInfo4 = new ValidationCollectorInfo (componentValidationCollector, typeof (AggregatingValidationCollectorProvider));
      _validationCollectorInfo5 = new ValidationCollectorInfo (componentValidationCollector, typeof (AggregatingValidationCollectorProvider));
      _validationCollectorInfo6 = new ValidationCollectorInfo (componentValidationCollector, typeof (AggregatingValidationCollectorProvider));
      _validationCollectorInfo7 = new ValidationCollectorInfo (componentValidationCollector, typeof (AggregatingValidationCollectorProvider));
      _validationCollectorInfo8 = new ValidationCollectorInfo (componentValidationCollector, typeof (AggregatingValidationCollectorProvider));
      _validationCollectorInfo9 = new ValidationCollectorInfo (componentValidationCollector, typeof (AggregatingValidationCollectorProvider));
      _validationCollectorInfo10 = new ValidationCollectorInfo (componentValidationCollector, typeof (AggregatingValidationCollectorProvider));
    }
        public MixedInvolvedTypeProviderDecorator(IInvolvedTypeProvider involvedTypeProvider, IValidationTypeFilter validationTypeFilter)
        {
            ArgumentUtility.CheckNotNull("involvedTypeProvider", involvedTypeProvider);
            ArgumentUtility.CheckNotNull("validationTypeFilter", validationTypeFilter);

            _involvedTypeProvider = involvedTypeProvider;
            _validationTypeFilter = validationTypeFilter;
        }
        public void SetUp()
        {
            var compoundValidationTypeFilter = new CompoundValidationTypeFilter(
                new IValidationTypeFilter[] { new LoadFilteredValidationTypeFilter(), new MixedLoadFilteredValidationTypeFilter() });

            _mixedInvolvedTypeProvider = new MixedInvolvedTypeProviderDecorator(
                new InvolvedTypeProvider(compoundValidationTypeFilter),
                compoundValidationTypeFilter);
        }
コード例 #4
0
        public AggregatingValidationCollectorProvider(
            IInvolvedTypeProvider involvedTypeProvider,
            IEnumerable <IValidationCollectorProvider> validationCollectorProviders)
        {
            ArgumentUtility.CheckNotNull("involvedTypeProvider", involvedTypeProvider);
            ArgumentUtility.CheckNotNull("validationCollectorProviders", validationCollectorProviders);

            _involvedTypeProvider         = involvedTypeProvider;
            _validationCollectorProviders = validationCollectorProviders.ToList();
        }
コード例 #5
0
 public void SetUp()
 {
     _involvedTypeProvider = new InvolvedTypeProvider(
         new CompoundValidationTypeFilter(new IValidationTypeFilter[] { new LoadFilteredValidationTypeFilter() }));
 }