public void Generate_Report_Once_Tests_Were_Executed() { var coverageRunner = new CoverageRunner(_instrumentatorMock, _testRunnerMock, _coverageReportMock); coverageRunner.Run("testProjectOutputPath", "report.xml"); Received.InOrder(() => { _testRunnerMock.Run(Arg.Any <CoverageContext>(), Arg.Any <string>()); _coverageReportMock.Export(Arg.Any <CoverageContext>(), Arg.Any <string>()); }); }
public void Run(string testProjectOutputPath, string reportPath) { if (String.IsNullOrEmpty(reportPath)) { reportPath = "coverage.xml"; } var coverageContext = new CoverageContext(); _instrumentator.ProcessAssembliesInFolder(coverageContext, testProjectOutputPath); _testRunner.Run(coverageContext, testProjectOutputPath); _coverageReport.Export(coverageContext, reportPath); }