Пример #1
0
        public void ThrowException_WhenAnyCtorInput_IsNull(
            DimensionValidator dimensionValidator,
            MasterDataDimensionValueValidator masterDataDimensionValueValidator,
            SourceFormatValidator sourceFormatValidator,
            DimensionStructureValidator dimensionStructureValidator,
            DimensionStructureDimensionStructureValidator dimensionStructureDimensionStructureValidator,
            DimensionStructureQueryObjectValidator dimensionStructureQueryObjectValidator,
            DimensionStructureNodeValidator dimensionStructureNodeValidator,
            SourceFormatDimensionStructureNodeValidator sourceFormatDimensionStructureNodeValidator)
        {
            // Arrange

            // Act
            Action action = () =>
            {
                new MasterDataValidators(
                    dimensionValidator,
                    masterDataDimensionValueValidator,
                    sourceFormatValidator,
                    dimensionStructureValidator,
                    dimensionStructureDimensionStructureValidator,
                    dimensionStructureQueryObjectValidator,
                    dimensionStructureNodeValidator,
                    sourceFormatDimensionStructureNodeValidator);
            };

            // Assert
            action.Should().ThrowExactly <GuardException>();
        }
 protected override void Context()
 {
     _pathFactory  = new ObjectPathFactory(new AliasCreator());
     _userSettings = A.Fake <IUserSettings>();
     _userSettings.CheckDimensions = true;
     _buildConfiguration           = A.Fake <IBuildConfiguration>();
     A.CallTo(() => _buildConfiguration.BuilderFor(A <IObjectBase> ._)).ReturnsLazily(x => x.GetArgument <IObjectBase>(0));
     sut = new DimensionValidator(new DimensionParser(), _pathFactory, _userSettings);
 }