private static void AssertIsNotTestProject(BuildLog log, string projectName = "foo.proj") { log.GetPropertyAsBoolean(TargetProperties.SonarQubeTestProject).Should().BeFalse(); log.Messages.Should() .Contain($"Sonar: ({projectName}) Categorizing project as test or product code...").And .Contain($"Sonar: ({projectName}) categorized as MAIN project (production code)."); }
private static void AssertIsTestProject(BuildLog log, string expectedReason) { log.GetPropertyAsBoolean(TargetProperties.SonarQubeTestProject).Should().BeTrue(); log.Messages.Should() .Contain("Sonar: (foo.proj) Categorizing project as test or product code...").And .Contain("Sonar: (foo.proj) categorized as TEST project (test code).").And .Contain(expectedReason); }
private static void AssertProjectIsNotExcluded(BuildLog log) { log.GetPropertyAsBoolean(TargetProperties.SonarQubeExcludeMetadata).Should().BeFalse(); }
private static void AssertIsNotTestProject(BuildLog log) { log.GetPropertyAsBoolean(TargetProperties.SonarQubeTestProject).Should().BeFalse(); log.MessageLog.Should().Contain("categorized as MAIN project (production code).\n"); }
private static void AssertIsTestProject(BuildLog log) { log.GetPropertyAsBoolean(TargetProperties.SonarQubeTestProject).Should().BeTrue(); log.MessageLog.Should().Contain("categorized as TEST project (test code). This MSBuild project will not be analyzed.\n"); }
private static void AssertIsNotTestProject(BuildLog log) { log.GetPropertyAsBoolean(TargetProperties.SonarQubeTestProject).Should().BeFalse(); }