public void ShouldCreateCorrectNamespacesRule()
        {
            //GIVEN
            var ruleFactory = new ProjectScopedRuleFactory(Any.Instance <IProjectScopedRuleViolationFactory>());
            var ruleDto     = Any.Instance <CorrectNamespacesRuleComplementDto>();

            //WHEN
            var projectScopedRule = ruleFactory.CreateProjectScopedRuleFrom(ruleDto);

            //THEN
            projectScopedRule.Should().BeOfType <ProjectScopedRuleApplicableToMatchingProject>();
            projectScopedRule.Should().DependOn <ProjectSourceCodeFilesRelatedRule>();
            projectScopedRule.Should().DependOn(ruleDto.ProjectAssemblyNamePattern);
        }
        public void ShouldCreateHasAttributesOnRuleFromDto()
        {
            //GIVEN
            var ruleFactory = new ProjectScopedRuleFactory(Any.Instance <IProjectScopedRuleViolationFactory>());
            var ruleDto     = Any.Instance <HasAttributesOnRuleComplementDto>();

            //WHEN
            var projectScopedRule = ruleFactory.CreateProjectScopedRuleFrom(ruleDto);

            //THEN
            projectScopedRule.Should().BeOfType <ProjectScopedRuleApplicableToMatchingProject>();
            projectScopedRule.Should().DependOn <ProjectSourceCodeFilesRelatedRule>();
            projectScopedRule.Should().DependOn <MethodsOfMatchingClassesAreDecoratedWithAttributeCheck>();
            projectScopedRule.Should().DependOn(ruleDto.ClassNameInclusionPattern);
            projectScopedRule.Should().DependOn(ruleDto.MethodNameInclusionPattern);
        }
        public void ShouldCreateHasTargetFrameworkRuleFromDto()
        {
            //GIVEN
            var ruleViolationFactory = Any.Instance <IProjectScopedRuleViolationFactory>();
            var ruleFactory          = new ProjectScopedRuleFactory(ruleViolationFactory);
            var ruleDto = Any.Instance <HasTargetFrameworkRuleComplementDto>();

            //WHEN
            var projectScopedRule = ruleFactory.CreateProjectScopedRuleFrom(ruleDto);

            //THEN
            projectScopedRule.Should().BeOfType <ProjectScopedRuleApplicableToMatchingProject>();
            projectScopedRule.Should().DependOn <HasPropertyValueRule>(SkipStringNothing);
            projectScopedRule.Should().DependOn(ruleDto.ProjectAssemblyNamePattern, SkipStringNothing);
            projectScopedRule.Should().DependOn(ruleDto.TargetFramework, SkipStringNothing);
            projectScopedRule.Should().DependOn(ruleViolationFactory, SkipStringNothing);
        }