Exemplo n.º 1
0
        public void RunTests(Guid projectWatcherId, FileSystemEventArgs e)
        {
            _logger.LogInformation($"Running Dll {e.Name}");
            var fullPathWithFileNameRemoved = e.FullPath.Substring(0, e.FullPath.Length - e.Name.Length);
            var projectPath = Path.Combine(fullPathWithFileNameRemoved, "..", "..", "..");

            var testResultMessage = _commandLineService.RunTestProject(projectPath);

            var testSummary = _testSummaryParser.CreateTestSummary(testResultMessage);
            var testDetails = _testDetailParser.CreateTestDetails(testResultMessage);

            var reportId = _autoTestRunnerClient.CreateTestReport(projectWatcherId, testSummary, testDetails);

            _windowsNotificationService.Push(projectWatcherId: projectWatcherId, reportId: reportId, testSummary);
        }
        public TestSummary GetTestResult(string testResultMessage)
        {
            var t = _testDetailParser.CreateTestDetails(testResultMessage);

            return(_testSummaryParser.CreateTestSummary(testResultMessage));
        }