コード例 #1
0
		Task AfterTestsRunTask(Task task, CodeCoverageResultsReader coverageResultsReader)
		{
			if (task.Exception != null)
				throw task.Exception;
			
			ShowCodeCoverageResultsPadIfNoCriticalTestFailures();
			DisplayCodeCoverageResults(coverageResultsReader);
			return task;
		}
コード例 #2
0
 void DisplayCodeCoverageResults(CodeCoverageResultsReader coverageResultsReader)
 {
     foreach (CodeCoverageResults result in GetResults(coverageResultsReader))
     {
         DisplayCodeCoverageResults(result);
     }
     foreach (string missingFile in coverageResultsReader.GetMissingResultsFiles())
     {
         DisplayNoCodeCoverageResultsGeneratedMessage(missingFile);
     }
 }
コード例 #3
0
        Task AfterTestsRunTask(Task task, CodeCoverageResultsReader coverageResultsReader)
        {
            if (task.Exception != null)
            {
                throw task.Exception;
            }

            ShowCodeCoverageResultsPadIfNoCriticalTestFailures();
            DisplayCodeCoverageResults(coverageResultsReader);
            return(task);
        }
コード例 #4
0
		public override void Run()
		{
			ClearCodeCoverageResults();
			
			var coverageResultsReader = new CodeCoverageResultsReader();
			var options = new TestExecutionOptions {
				ModifyProcessStartInfoBeforeTestRun = (startInfo, tests) => {
					OpenCoverApplication app = CreateOpenCoverApplication(startInfo, tests);
					coverageResultsReader.AddResultsFile(app.CodeCoverageResultsFileName);
					return app.GetProcessStartInfo();
				}
			};
			
			ITestService testService = SD.GetRequiredService<ITestService>();
			IEnumerable<ITest> allTests = GetTests(testService);
			testService.RunTestsAsync(allTests, options)
				.ContinueWith(t => AfterTestsRunTask(t, coverageResultsReader))
				.FireAndForget();
		}
コード例 #5
0
        public override void Run()
        {
            ClearCodeCoverageResults();

            var coverageResultsReader = new CodeCoverageResultsReader();
            var options = new TestExecutionOptions {
                ModifyProcessStartInfoBeforeTestRun = (startInfo, tests) => {
                    OpenCoverApplication app = CreateOpenCoverApplication(startInfo, tests);
                    coverageResultsReader.AddResultsFile(app.CodeCoverageResultsFileName);
                    return(app.GetProcessStartInfo());
                }
            };

            ITestService        testService = SD.GetRequiredService <ITestService>();
            IEnumerable <ITest> allTests    = GetTests(testService);

            testService.RunTestsAsync(allTests, options)
            .ContinueWith(t => AfterTestsRunTask(t, coverageResultsReader))
            .FireAndForget();
        }
コード例 #6
0
		IEnumerable<CodeCoverageResults> GetResults(CodeCoverageResultsReader coverageResultsReader)
		{
			return SD.MainThread.InvokeIfRequired(() => coverageResultsReader.GetResults().ToList());
		}
コード例 #7
0
		void DisplayCodeCoverageResults(CodeCoverageResultsReader coverageResultsReader)
		{
			foreach (CodeCoverageResults result in GetResults(coverageResultsReader)) {
				DisplayCodeCoverageResults(result);
			}
			foreach (string missingFile in coverageResultsReader.GetMissingResultsFiles()) {
				DisplayNoCodeCoverageResultsGeneratedMessage(missingFile);
			}
		}
コード例 #8
0
 IEnumerable <CodeCoverageResults> GetResults(CodeCoverageResultsReader coverageResultsReader)
 {
     return(SD.MainThread.InvokeIfRequired(() => coverageResultsReader.GetResults().ToList()));
 }