refactored features to be components instead, so we have more runtime config (for example template config etc), this can be done, because features depend on the code anyway and do not need to be done via property files, the property files only define the default values when starting up

fixed feature disabled message not being templated and refactored the way condition checks are handled by the command received handler, so we do not use exceptions for this, this handled by a specified state in the result and a separate post execution handler
added separate config module to the commands
added command to see which features are available, and their current state
fixed scheduler test
This commit is contained in:
Sheldan
2020-04-26 11:38:27 +02:00
parent bd554537cc
commit 4800470f86
136 changed files with 950 additions and 332 deletions

View File

@@ -52,6 +52,9 @@ public class SchedulerServiceBeanTest {
@Mock
private Scheduler scheduler;
@Mock
private Trigger trigger;
@Before
public void setup() throws ClassNotFoundException {
when(schedulerFactoryBean.getScheduler()).thenReturn(scheduler);
@@ -97,7 +100,8 @@ public class SchedulerServiceBeanTest {
@Test
public void executeJobOnce() throws SchedulerException {
when(scheduleCreator.createOnceOnlyTriggerForJob(eq(JOB_NAME), eq(GROUP_NAME), any(Date.class), any(JobDataMap.class))).thenReturn(Mockito.mock(Trigger.class));
when(scheduleCreator.createOnceOnlyTriggerForJob(eq(JOB_NAME), eq(GROUP_NAME), any(Date.class), any(JobDataMap.class))).thenReturn(trigger);
when(trigger.getKey()).thenReturn(TriggerKey.triggerKey("random key"));
classToTest.executeJobWithParametersOnce(JOB_NAME, GROUP_NAME, new JobDataMap(), new Date());
verify(scheduler, times(1)).scheduleJob(any(Trigger.class));
}