use of com.cronutils.model.field.definition.FieldDefinition in project cron-utils by jmrozanec.
the class FieldDefinitionTest method setUp.
@Before
public void setUp() {
MockitoAnnotations.initMocks(this);
testFieldName = CronFieldName.SECOND;
fieldDefinition = new FieldDefinition(testFieldName, mockConstraints);
}
use of com.cronutils.model.field.definition.FieldDefinition in project cron-utils by jmrozanec.
the class FieldDefinitionTest method testCreateFieldDefinitionComparatorLesser.
@Test
public void testCreateFieldDefinitionComparatorLesser() {
final CronFieldName name1 = CronFieldName.DAY_OF_MONTH;
final CronFieldName name2 = CronFieldName.SECOND;
final FieldDefinition fieldDefinition1 = new FieldDefinition(name1, mockConstraints);
final FieldDefinition fieldDefinition2 = new FieldDefinition(name2, mock(FieldConstraints.class));
assertNotEquals(name1.getOrder(), name2.getOrder());
assertTrue(FieldDefinition.createFieldDefinitionComparator().compare(fieldDefinition2, fieldDefinition1) < 0);
}
Aggregations