private void AssertExpectedAdditionalFiles(BuildLog result, params string[] testSpecificAdditionalFiles) { var projectSetupAdditionalFiles = new[] { @"c:\config.1.txt", @"c:\config.2.txt" }; var projectSpecificOutFolderFilePath = result.GetPropertyValue(TargetProperties.SonarProjectOutFolderFilePath); var projectSpecificConfigFilePath = result.GetPropertyValue(TargetProperties.SonarProjectConfigFilePath); var allExpectedAdditionalFiles = projectSetupAdditionalFiles.Concat(testSpecificAdditionalFiles).Concat(new[] { projectSpecificOutFolderFilePath, projectSpecificConfigFilePath }); AssertExpectedItemValuesExists(result, TargetProperties.AdditionalFilesItemType, allExpectedAdditionalFiles.ToArray()); }
private static void AssertAnalysisTargetsAreImported(BuildLog result) { var propertyInstance = result.GetPropertyValue(DummyAnalysisTargetsMarkerProperty, true); propertyInstance.Should().NotBeNull("Failed to import the SonarQube Analysis targets"); }
private static void AssertAnalysisTargetsAreNotImported(BuildLog result) { var propertyInstance = result.GetPropertyValue(DummyAnalysisTargetsMarkerProperty, true); propertyInstance.Should().BeNull("SonarQube Analysis targets should not have been imported"); }
/// <summary> /// Checks the error log property has been set to the value supplied in the targets file /// </summary> private static void AssertErrorLogIsSetBySonarQubeTargets(BuildLog result) { var projectSpecificOutDir = result.GetPropertyValue(TargetProperties.ProjectSpecificOutDir); AssertExpectedErrorLog(result, projectSpecificOutDir + @"\Issues.json"); }