Exemple #1
0
        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);
            }
        }
Exemple #2
0
        private void CheckTestJobFinished(ITestJobManager testJobManager)
        {
            if (!testJobManager.IsFinished())
            {
                return;
            }

            if (IsEmailNecessary(testJobManager))
            {
                _testJobFinishedMail.Send(testJobManager);
            }

            _currentTestJobManagers.Remove(testJobManager);
        }
Exemple #3
0
        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);
        }