BATCH-1636: add Ordered interface
This commit is contained in:
@@ -17,6 +17,7 @@ import org.springframework.context.event.ContextClosedEvent;
|
||||
import org.springframework.context.event.ContextRefreshedEvent;
|
||||
import org.springframework.context.support.ClassPathXmlApplicationContext;
|
||||
import org.springframework.context.support.GenericApplicationContext;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.core.io.Resource;
|
||||
|
||||
@@ -39,6 +40,16 @@ public class AutomaticJobRegistrarTests {
|
||||
registrar.setJobLoader(jobLoader);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testOrderedImplemented() throws Exception {
|
||||
|
||||
assertTrue(registrar instanceof Ordered);
|
||||
assertEquals(Ordered.LOWEST_PRECEDENCE, registrar.getOrder());
|
||||
registrar.setOrder(1);
|
||||
assertEquals(1, registrar.getOrder());
|
||||
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testLocateJob() throws Exception {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user