@Override public String toString() { return super.toString() + ", jobExecutionContext=" + getJobExecutionContext() + ", jobParameters=" + getJobParameters(); }
@Test public void testJobParameters() throws Exception { JobParameters jobParameters = new JobParametersBuilder().addString("foo", "bar").toJobParameters(); JobInstance jobInstance = new JobInstance(0L, "foo"); jobExecution = new JobExecution(5L, jobParameters); jobExecution.setJobInstance(jobInstance); context = new JobContext(jobExecution); assertEquals("bar", context.getJobParameters().get("foo")); }
private void testJobParameters(Object target) throws Exception { TestContext testContext = getTestContext(target); listener.prepareTestInstance(testContext); try { listener.beforeTestMethod(testContext); JobContext context = JobSynchronizationManager.getContext(); assertNotNull(context); assertEquals("spam", context.getJobParameters().get("foo")); } finally { listener.afterTestMethod(testContext); } assertNull(JobSynchronizationManager.getContext()); }
@Override public String toString() { return super.toString() + ", jobExecutionContext=" + getJobExecutionContext() + ", jobParameters=" + getJobParameters(); }
@Override public String toString() { return super.toString() + ", jobExecutionContext=" + getJobExecutionContext() + ", jobParameters=" + getJobParameters(); }
@Override public String toString() { return super.toString() + ", jobExecutionContext=" + getJobExecutionContext() + ", jobParameters=" + getJobParameters(); }