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);
 }
Exemple #3
0
 private static void AssertProjectIsNotExcluded(BuildLog log)
 {
     log.GetPropertyAsBoolean(TargetProperties.SonarQubeExcludeMetadata).Should().BeFalse();
 }
Exemple #4
0
 private static void AssertIsNotTestProject(BuildLog log)
 {
     log.GetPropertyAsBoolean(TargetProperties.SonarQubeTestProject).Should().BeFalse();
     log.MessageLog.Should().Contain("categorized as MAIN project (production code).\n");
 }
Exemple #5
0
 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");
 }
Exemple #6
0
 private static void AssertIsNotTestProject(BuildLog log)
 {
     log.GetPropertyAsBoolean(TargetProperties.SonarQubeTestProject).Should().BeFalse();
 }