Esempio n. 1
0
 public IProjectScopedRule CreateProjectScopedRuleFrom(CorrectNamespacesRuleComplementDto ruleDto)
 {
     return(new ProjectScopedRuleApplicableToMatchingProject(ruleDto.ProjectAssemblyNamePattern,
                                                             new ProjectSourceCodeFilesRelatedRule(
                                                                 HasCorrectNamespacesRuleMetadata.Format(ruleDto),
                                                                 new CorrectNamespacesInFileCheck())));
 }
        public static void ShouldProvideFormattedDescriptionOfCorrectNamespacesDto()
        {
            //GIVEN
            var dto = Any.Instance <CorrectNamespacesRuleComplementDto>();

            //WHEN
            var text = HasCorrectNamespacesRuleMetadata.Format(dto);

            //THEN
            text.Should().Be(new RuleDescription($"{dto.ProjectAssemblyNamePattern.Text()} {dto.RuleName}"));
        }
 public void Log(CorrectNamespacesRuleComplementDto dto)
 {
     _writeLine($"{DiscoveredRule}{HasCorrectNamespacesRuleMetadata.Format(dto)}");
 }
 public void Log(CorrectNamespacesRuleComplementDto dto)
 {
     Log(HasCorrectNamespacesRuleMetadata.Format(dto));
 }