Ejemplo n.º 1
0
 private void RollbackStep(TStep step)
 {
     StatusMessage = step.RollbackStatusMessage;
     _logger.Info($"{WorkflowName} - {StatusMessage}");
     StepStarted?.Invoke();
     step.RollBackAction?.Invoke(_context);
     StepCompleted?.Invoke();
 }
Ejemplo n.º 2
0
 public void OnStepStarted(ITaskStep step, TaskDefinition task)
 {
     StepStarted?.Invoke(new StepStartedEvent
     {
         Step      = step,
         Task      = task,
         Timestamp = DateTimeUtils.Now
     });
 }
Ejemplo n.º 3
0
        private void RunStep(TStep step)
        {
            StatusMessage = step.StatusMessage;
            _logger.Info($"{WorkflowName} - {StatusMessage}");

            _cancellationToken.ThrowIfCancellationRequested();

            StepStarted?.Invoke();
            step.ExecuteAction?.Invoke(_context);
            StepCompleted?.Invoke();
        }
Ejemplo n.º 4
0
        public void UpdateGrade(CompleteGrade grade)
        {
            InitializeGradeIfEmpty(grade);

            if (_currentVersion >= _firstVersion)
            {
                StepStarted?.Invoke(this, $"RUNNING {_completudeTests.GradeName} TESTS");
                grade.TestResults[_completudeTests.GradeName] = _testRunner.RunTests(_completudeTests);

                StepStarted?.Invoke(this, $"RUNNING {_currentVersionTests.GradeName} TESTS");
                grade.TestResults[_currentVersionTests.GradeName] = _testRunner.RunTests(_currentVersionTests);
            }

            StepStarted?.Invoke(this, $"RUNNING TEST COVERAGE");
            grade.TestCoverage = _coverageRunner.Run(_completudeTests);
        }