public String getComment() { return jobMeta != null ? jobMeta.getDisabledComment() : ""; }
@ParameterizedTest @MethodSource("data") public void shouldGetJobMetaForRunningJob(final JobMetaRepository testee) { testee.deleteAll(); testee.setRunningJob("someJob", "someId"); final JobMeta jobMeta = testee.getJobMeta("someJob"); assertThat(jobMeta.getAll(), is(emptyMap())); assertThat(jobMeta.isDisabled(), is(false)); assertThat(jobMeta.getDisabledComment(), is("")); assertThat(jobMeta.isRunning(), is(true)); assertThat(jobMeta.getJobType(), is("someJob")); }
@ParameterizedTest @MethodSource("data") public void shouldGetEmptyJobMeta(final JobMetaRepository testee) { testee.deleteAll(); final JobMeta jobMeta = testee.getJobMeta("someJob"); assertThat(jobMeta.getAll(), is(emptyMap())); assertThat(jobMeta.isDisabled(), is(false)); assertThat(jobMeta.getDisabledComment(), is("")); assertThat(jobMeta.isRunning(), is(false)); assertThat(jobMeta.getJobType(), is("someJob")); }
@ParameterizedTest @MethodSource("data") public void shouldGetJobMetaForDisabledJob(final JobMetaRepository testee) { testee.deleteAll(); testee.disable("someJob", "some comment"); final JobMeta jobMeta = testee.getJobMeta("someJob"); assertThat(jobMeta.getAll(), is(emptyMap())); assertThat(jobMeta.isDisabled(), is(true)); assertThat(jobMeta.getDisabledComment(), is("some comment")); assertThat(jobMeta.isRunning(), is(false)); assertThat(jobMeta.getJobType(), is("someJob")); }
@ParameterizedTest @MethodSource("data") public void shouldGetJobMetaForDisabledJobWithProperties(final JobMetaRepository testee) { testee.deleteAll(); testee.disable("someJob", "some comment"); testee.setValue("someJob", "someKey", "some value"); final JobMeta jobMeta = testee.getJobMeta("someJob"); assertThat(jobMeta.getAll(), is(singletonMap("someKey", "some value"))); assertThat(jobMeta.isDisabled(), is(true)); assertThat(jobMeta.getDisabledComment(), is("some comment")); assertThat(jobMeta.isRunning(), is(false)); assertThat(jobMeta.getJobType(), is("someJob")); }
message = format(JOB_DEACTIVATED_MESSAGE, jobMeta.getDisabledComment());