string XPathForModuleForProject(Project project) { var projectOutputFile = Path.GetFileName(project.GetOutputFileName(Configuration)); var coverageOutputPath = CoverageService.CoverageOutputPathForProject(TestProject, Configuration); var coveredOutputFile = Path.Combine(coverageOutputPath, projectOutputFile); return($"/CoverageSession/Modules/Module[ModulePath/text()=\"{coveredOutputFile}\"]"); }
public CoverageResults(Project testProject, ConfigurationSelector configuration) { TestProject = testProject; Configuration = configuration; ResultsFile = CoverageService.CoverageFilePathForProject(TestProject, Configuration); if (!File.Exists(ResultsFile)) { return; } results = new XPathDocument(ResultsFile); resultsNavigator = results.CreateNavigator(); }