Search in sources :

Example 1 with StageStatisticsCollector

use of com.github.nagyesta.abortmission.core.healthcheck.impl.StageStatisticsCollector in project abort-mission by nagyesta.

the class LaunchSequenceTemplateTest method addEvaluatorMockWithSpyLogger.

private Set<MissionHealthCheckEvaluator> addEvaluatorMockWithSpyLogger(final Set<MissionHealthCheckEvaluator> evaluators, final boolean aborting) {
    final MissionHealthCheckMatcher matcher = mock(MissionHealthCheckMatcher.class);
    final MissionHealthCheckEvaluator evaluator = mock(MissionHealthCheckEvaluator.class);
    when(evaluator.countdownLogger()).thenReturn(spy(new StageStatisticsCollector(matcher)));
    when(evaluator.missionLogger()).thenReturn(spy(new StageStatisticsCollector(matcher)));
    when(evaluator.shouldAbort()).thenReturn(aborting);
    when(evaluator.shouldAbortCountdown()).thenReturn(aborting);
    evaluators.add(evaluator);
    return evaluators;
}
Also used : StageStatisticsCollector(com.github.nagyesta.abortmission.core.healthcheck.impl.StageStatisticsCollector) MissionHealthCheckEvaluator(com.github.nagyesta.abortmission.core.healthcheck.MissionHealthCheckEvaluator) MissionHealthCheckMatcher(com.github.nagyesta.abortmission.core.matcher.MissionHealthCheckMatcher)

Aggregations

MissionHealthCheckEvaluator (com.github.nagyesta.abortmission.core.healthcheck.MissionHealthCheckEvaluator)1 StageStatisticsCollector (com.github.nagyesta.abortmission.core.healthcheck.impl.StageStatisticsCollector)1 MissionHealthCheckMatcher (com.github.nagyesta.abortmission.core.matcher.MissionHealthCheckMatcher)1