@Test public void testConvert_01() { BuildState state = SlackNotificationBuildStateConverter.convert(OldStyleBuildState.ALL_ENABLED); assertTrue(state.allEnabled()); }
public static BuildState convert(Integer oldState){ BuildState newStates = new BuildState(); newStates.setEnabled(BuildStateEnum.BUILD_STARTED, OldStyleBuildState.enabled(OldStyleBuildState.BUILD_STARTED, oldState)); newStates.setEnabled(BuildStateEnum.BEFORE_BUILD_FINISHED, OldStyleBuildState.enabled(OldStyleBuildState.BEFORE_BUILD_FINISHED, oldState)); newStates.setEnabled(BuildStateEnum.BUILD_INTERRUPTED, OldStyleBuildState.enabled(OldStyleBuildState.BUILD_INTERRUPTED, oldState)); newStates.setEnabled(BuildStateEnum.RESPONSIBILITY_CHANGED, OldStyleBuildState.enabled(OldStyleBuildState.RESPONSIBILITY_CHANGED, oldState)); newStates.setEnabled(BuildStateEnum.BUILD_FINISHED, OldStyleBuildState.enabled(OldStyleBuildState.BUILD_FINISHED, oldState)); newStates.setEnabled(BuildStateEnum.BUILD_SUCCESSFUL, OldStyleBuildState.enabled(OldStyleBuildState.BUILD_FINISHED, oldState)); newStates.setEnabled(BuildStateEnum.BUILD_FAILED, OldStyleBuildState.enabled(OldStyleBuildState.BUILD_FINISHED, oldState)); return newStates; }
SlackNotificationBuildStateConverter { public static BuildState convert(Integer oldState){ BuildState newStates = new BuildState(); newStates.setEnabled(BuildStateEnum.BUILD_STARTED, OldStyleBuildState.enabled(OldStyleBuildState.BUILD_STARTED, oldState)); newStates.setEnabled(BuildStateEnum.BEFORE_BUILD_FINISHED, OldStyleBuildState.enabled(OldStyleBuildState.BEFORE_BUILD_FINISHED, oldState)); newStates.setEnabled(BuildStateEnum.BUILD_INTERRUPTED, OldStyleBuildState.enabled(OldStyleBuildState.BUILD_INTERRUPTED, oldState)); newStates.setEnabled(BuildStateEnum.RESPONSIBILITY_CHANGED, OldStyleBuildState.enabled(OldStyleBuildState.RESPONSIBILITY_CHANGED, oldState)); newStates.setEnabled(BuildStateEnum.BUILD_FINISHED, OldStyleBuildState.enabled(OldStyleBuildState.BUILD_FINISHED, oldState)); newStates.setEnabled(BuildStateEnum.BUILD_SUCCESSFUL, OldStyleBuildState.enabled(OldStyleBuildState.BUILD_FINISHED, oldState)); newStates.setEnabled(BuildStateEnum.BUILD_FAILED, OldStyleBuildState.enabled(OldStyleBuildState.BUILD_FINISHED, oldState)); return newStates; } }
SlackNotificationBuildStateConverter { public static BuildState convert(Integer oldState){ BuildState newStates = new BuildState(); newStates.setEnabled(BuildStateEnum.BUILD_STARTED, OldStyleBuildState.enabled(OldStyleBuildState.BUILD_STARTED, oldState)); newStates.setEnabled(BuildStateEnum.BEFORE_BUILD_FINISHED, OldStyleBuildState.enabled(OldStyleBuildState.BEFORE_BUILD_FINISHED, oldState)); newStates.setEnabled(BuildStateEnum.BUILD_INTERRUPTED, OldStyleBuildState.enabled(OldStyleBuildState.BUILD_INTERRUPTED, oldState)); newStates.setEnabled(BuildStateEnum.RESPONSIBILITY_CHANGED, OldStyleBuildState.enabled(OldStyleBuildState.RESPONSIBILITY_CHANGED, oldState)); newStates.setEnabled(BuildStateEnum.BUILD_FINISHED, OldStyleBuildState.enabled(OldStyleBuildState.BUILD_FINISHED, oldState)); newStates.setEnabled(BuildStateEnum.BUILD_SUCCESSFUL, OldStyleBuildState.enabled(OldStyleBuildState.BUILD_FINISHED, oldState)); newStates.setEnabled(BuildStateEnum.BUILD_FAILED, OldStyleBuildState.enabled(OldStyleBuildState.BUILD_FINISHED, oldState)); return newStates; } private  SlackNotificationBuildStateConverter(); }
SlackNotificationBuildStateConverter { public static BuildState convert(Integer oldState){ BuildState newStates = new BuildState(); newStates.setEnabled(BuildStateEnum.BUILD_STARTED, OldStyleBuildState.enabled(OldStyleBuildState.BUILD_STARTED, oldState)); newStates.setEnabled(BuildStateEnum.BEFORE_BUILD_FINISHED, OldStyleBuildState.enabled(OldStyleBuildState.BEFORE_BUILD_FINISHED, oldState)); newStates.setEnabled(BuildStateEnum.BUILD_INTERRUPTED, OldStyleBuildState.enabled(OldStyleBuildState.BUILD_INTERRUPTED, oldState)); newStates.setEnabled(BuildStateEnum.RESPONSIBILITY_CHANGED, OldStyleBuildState.enabled(OldStyleBuildState.RESPONSIBILITY_CHANGED, oldState)); newStates.setEnabled(BuildStateEnum.BUILD_FINISHED, OldStyleBuildState.enabled(OldStyleBuildState.BUILD_FINISHED, oldState)); newStates.setEnabled(BuildStateEnum.BUILD_SUCCESSFUL, OldStyleBuildState.enabled(OldStyleBuildState.BUILD_FINISHED, oldState)); newStates.setEnabled(BuildStateEnum.BUILD_FAILED, OldStyleBuildState.enabled(OldStyleBuildState.BUILD_FINISHED, oldState)); return newStates; } private  SlackNotificationBuildStateConverter(); static BuildState convert(Integer oldState); }
SlackNotificationBuildStateConverter { public static BuildState convert(Integer oldState){ BuildState newStates = new BuildState(); newStates.setEnabled(BuildStateEnum.BUILD_STARTED, OldStyleBuildState.enabled(OldStyleBuildState.BUILD_STARTED, oldState)); newStates.setEnabled(BuildStateEnum.BEFORE_BUILD_FINISHED, OldStyleBuildState.enabled(OldStyleBuildState.BEFORE_BUILD_FINISHED, oldState)); newStates.setEnabled(BuildStateEnum.BUILD_INTERRUPTED, OldStyleBuildState.enabled(OldStyleBuildState.BUILD_INTERRUPTED, oldState)); newStates.setEnabled(BuildStateEnum.RESPONSIBILITY_CHANGED, OldStyleBuildState.enabled(OldStyleBuildState.RESPONSIBILITY_CHANGED, oldState)); newStates.setEnabled(BuildStateEnum.BUILD_FINISHED, OldStyleBuildState.enabled(OldStyleBuildState.BUILD_FINISHED, oldState)); newStates.setEnabled(BuildStateEnum.BUILD_SUCCESSFUL, OldStyleBuildState.enabled(OldStyleBuildState.BUILD_FINISHED, oldState)); newStates.setEnabled(BuildStateEnum.BUILD_FAILED, OldStyleBuildState.enabled(OldStyleBuildState.BUILD_FINISHED, oldState)); return newStates; } private  SlackNotificationBuildStateConverter(); static BuildState convert(Integer oldState);  }