private void CheckTestJobFinished(ITestJobManager testJobManager) { if (!testJobManager.IsFinished()) { return; } _currentTestJobManagers.Remove(testJobManager); if (testJobManager.IsCanceled) { testJobManager.TestJob.ResultCode = TestState.Canceled; } else { testJobManager.TestJob.ResultCode = (testJobManager.Passed == testJobManager.Count) ? TestState.Success : TestState.Error; } testJobManager.TestJob.FinishedAt = DateTime.Now; _testJobRepository.Store(testJobManager.TestJob); if (IsEmailNecessary(testJobManager)) { _testJobFinishedMail.Send(testJobManager); } }
private void CheckTestJobFinished(ITestJobManager testJobManager) { if (!testJobManager.IsFinished()) { return; } if (IsEmailNecessary(testJobManager)) { _testJobFinishedMail.Send(testJobManager); } _currentTestJobManagers.Remove(testJobManager); }
private void CheckTestJobFinished(ITestJobManager testJobManager) { if (!testJobManager.IsFinished()) return; _currentTestJobManagers.Remove(testJobManager); if (testJobManager.IsCanceled) { testJobManager.TestJob.ResultCode = TestState.Canceled; } else { testJobManager.TestJob.ResultCode = (testJobManager.Passed == testJobManager.Count) ? TestState.Success : TestState.Error; } testJobManager.TestJob.FinishedAt = DateTime.Now; _testJobRepository.Store(testJobManager.TestJob); if (IsEmailNecessary(testJobManager)) _testJobFinishedMail.Send(testJobManager); }