Search in sources :

Example 1 with OtherJob

use of com.dangdang.ddframe.job.fixture.job.OtherJob in project elastic-job by dangdangdotcom.

the class JobExecutorFactoryTest method assertGetJobExecutorWhenJobClassWhenUnsupportedJob.

@Test(expected = JobConfigurationException.class)
public void assertGetJobExecutorWhenJobClassWhenUnsupportedJob() {
    when(jobFacade.getShardingContexts()).thenReturn(new ShardingContexts("fake_task_id", "unsupported_test_job", 10, "", Collections.<Integer, String>emptyMap()));
    when(jobFacade.loadJobRootConfiguration(true)).thenReturn(new TestSimpleJobConfiguration());
    JobExecutorFactory.getJobExecutor(new OtherJob(), jobFacade);
}
Also used : TestSimpleJobConfiguration(com.dangdang.ddframe.job.fixture.config.TestSimpleJobConfiguration) OtherJob(com.dangdang.ddframe.job.fixture.job.OtherJob) Test(org.junit.Test)

Aggregations

TestSimpleJobConfiguration (com.dangdang.ddframe.job.fixture.config.TestSimpleJobConfiguration)1 OtherJob (com.dangdang.ddframe.job.fixture.job.OtherJob)1 Test (org.junit.Test)1