mirror of
https://github.com/Sheldan/abstracto.git
synced 2026-01-26 05:44:42 +00:00
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:
@@ -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));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user