예제 #1
0
        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());
        }
예제 #2
0
        private static void AssertAnalysisTargetsAreImported(BuildLog result)
        {
            var propertyInstance = result.GetPropertyValue(DummyAnalysisTargetsMarkerProperty, true);

            propertyInstance.Should().NotBeNull("Failed to import the SonarQube Analysis targets");
        }
예제 #3
0
        private static void AssertAnalysisTargetsAreNotImported(BuildLog result)
        {
            var propertyInstance = result.GetPropertyValue(DummyAnalysisTargetsMarkerProperty, true);

            propertyInstance.Should().BeNull("SonarQube Analysis targets should not have been imported");
        }
예제 #4
0
        /// <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");
        }