@Test void testGetHookPhasesBeforeStep() { Mockito.when(hooksPhaseBuilder.buildHookPhases(List.of(HookPhase.BEFORE_START), context)) .thenReturn(List.of(HookPhase.BLUE_GREEN_APPLICATION_BEFORE_START_LIVE)); List<HookPhase> expectedHooks = List.of(HookPhase.BLUE_GREEN_APPLICATION_BEFORE_START_LIVE); List<HookPhase> hookPhasesBeforeStep = step.getHookPhasesBeforeStep(context); assertEquals(expectedHooks, hookPhasesBeforeStep); }
@Override public List<HookPhase> getHookPhasesBeforeStep(ProcessContext context) { return hooksPhaseBuilder.buildHookPhases(Collections.singletonList(HookPhase.BEFORE_START), context); }
RestartAppStep extends TimeoutAsyncFlowableStepWithHooks implements BeforeStepHookPhaseProvider { @Override public List<HookPhase> getHookPhasesBeforeStep(ProcessContext context) { return hooksPhaseBuilder.buildHookPhases(Collections.singletonList(HookPhase.BEFORE_START), context); } }
RestartAppStep extends TimeoutAsyncFlowableStepWithHooks implements BeforeStepHookPhaseProvider { @Override public List<HookPhase> getHookPhasesBeforeStep(ProcessContext context) { return hooksPhaseBuilder.buildHookPhases(Collections.singletonList(HookPhase.BEFORE_START), context); }  }
RestartAppStep extends TimeoutAsyncFlowableStepWithHooks implements BeforeStepHookPhaseProvider { @Override public List<HookPhase> getHookPhasesBeforeStep(ProcessContext context) { return hooksPhaseBuilder.buildHookPhases(Collections.singletonList(HookPhase.BEFORE_START), context); }  @Override StepPhase executePollingStep(ProcessContext context); @Override List<HookPhase> getHookPhasesBeforeStep(ProcessContext context); @Override Integer getTimeout(ProcessContext context); }
RestartAppStep extends TimeoutAsyncFlowableStepWithHooks implements BeforeStepHookPhaseProvider { @Override public List<HookPhase> getHookPhasesBeforeStep(ProcessContext context) { return hooksPhaseBuilder.buildHookPhases(Collections.singletonList(HookPhase.BEFORE_START), context); }  @Override StepPhase executePollingStep(ProcessContext context); @Override List<HookPhase> getHookPhasesBeforeStep(ProcessContext context); @Override Integer getTimeout(ProcessContext context);  }