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;
}
Aggregations