@Test public void fixed_rate_string_1234_abc_definition_results_in_fixed_delay_and_1234_abc() { when(annotation.fixedRateString()).thenReturn("1234 abc"); SpringScheduleExtractor.SpringSchedule extracted = extractorToTest.extract(annotation); assertNotNull(extracted); assertNotNull(extracted); assertEquals("fixed rate:1234 abc", extracted.getScheduleDefinition()); assertEquals(ScheduleType.FIXED, extracted.getScheduleType()); }
public SpringSchedule extract(Scheduled springScheduled) { SpringSchedule data = extractSimpleString(springScheduled); if (getValueExtractor().isSpringValue(data.scheduleDefinition)) { SpringValue extracted = getValueExtractor().extract(data.scheduleDefinition); data.scheduleDefinition= extracted.toDescription(); data.scheduleKey=extracted.getKey(); data.scheduleDefaultValue=extracted.getDefaultValue(); } return data; }
SpringScheduleExtractor { public SpringSchedule extract(Scheduled springScheduled) { SpringSchedule data = extractSimpleString(springScheduled); if (getValueExtractor().isSpringValue(data.scheduleDefinition)) { SpringValue extracted = getValueExtractor().extract(data.scheduleDefinition); data.scheduleDefinition= extracted.toDescription(); data.scheduleKey=extracted.getKey(); data.scheduleDefaultValue=extracted.getDefaultValue(); } return data; } }
SpringScheduleExtractor { public SpringSchedule extract(Scheduled springScheduled) { SpringSchedule data = extractSimpleString(springScheduled); if (getValueExtractor().isSpringValue(data.scheduleDefinition)) { SpringValue extracted = getValueExtractor().extract(data.scheduleDefinition); data.scheduleDefinition= extracted.toDescription(); data.scheduleKey=extracted.getKey(); data.scheduleDefaultValue=extracted.getDefaultValue(); } return data; }  }
SpringScheduleExtractor { public SpringSchedule extract(Scheduled springScheduled) { SpringSchedule data = extractSimpleString(springScheduled); if (getValueExtractor().isSpringValue(data.scheduleDefinition)) { SpringValue extracted = getValueExtractor().extract(data.scheduleDefinition); data.scheduleDefinition= extracted.toDescription(); data.scheduleKey=extracted.getKey(); data.scheduleDefaultValue=extracted.getDefaultValue(); } return data; }  SpringSchedule extract(Scheduled springScheduled); }
SpringScheduleExtractor { public SpringSchedule extract(Scheduled springScheduled) { SpringSchedule data = extractSimpleString(springScheduled); if (getValueExtractor().isSpringValue(data.scheduleDefinition)) { SpringValue extracted = getValueExtractor().extract(data.scheduleDefinition); data.scheduleDefinition= extracted.toDescription(); data.scheduleKey=extracted.getKey(); data.scheduleDefaultValue=extracted.getDefaultValue(); } return data; }  SpringSchedule extract(Scheduled springScheduled);  }