Пример #1
0
        public void ReportRunTest()
        {
            if (_totalNumberOfTests == 0)
            {
                _testsProgressLogger.ReplaceLog(LoggingFormat,
                                                GenerateProgressBar(MaxProgressBar),
                                                0,
                                                0,
                                                100);
                return;
            }

            _numberOfTestsRun++;

            var totalNumberOfTestsPercentage = _numberOfTestsRun * 100 / _totalNumberOfTests;
            var progressBarCount             = totalNumberOfTestsPercentage / 10;

            var stringBuilder = GenerateProgressBar(progressBarCount);

            _testsProgressLogger.ReplaceLog(LoggingFormat,
                                            stringBuilder, _numberOfTestsRun, _totalNumberOfTests,
                                            totalNumberOfTestsPercentage);
        }
Пример #2
0
        public void ReportRunTest()
        {
            _numberOfMutantsRun++;

            var totalNumberOfTestsPercentage = _numberOfMutantsRun * 100 / _totalNumberOfMutants;
            var progressBarCount             = totalNumberOfTestsPercentage / 10;

            var stringBuilder = GenerateProgressBar(progressBarCount);

            _testsProgressLogger.ReplaceLog(LoggingFormat,
                                            stringBuilder,
                                            _numberOfMutantsRun,
                                            _totalNumberOfMutants,
                                            totalNumberOfTestsPercentage,
                                            RemainingTime());
        }
Пример #3
0
        public void ReportMutantTestResult(IReadOnlyMutant mutantTestResult)
        {
            switch (mutantTestResult.ResultStatus)
            {
            case MutantStatus.Killed:
                _mutantsKilledCount++;
                _mutantKilledLogger.ReplaceLog("Killed : {0}", _mutantsKilledCount);
                break;

            case MutantStatus.Survived:
                _mutantsSurvivedCount++;
                _mutantSurvivedLogger.ReplaceLog("Survived: {0}", _mutantsSurvivedCount);
                break;

            case MutantStatus.Timeout:
                _mutantsTimeoutCount++;
                _mutantTimeoutLogger.ReplaceLog("Timeout : {0}", _mutantsTimeoutCount);
                break;
            }
            ;
        }