BATCH-1628: Extend to all params, and add javadocs
This commit is contained in:
@@ -136,6 +136,22 @@ public class CommandLineJobRunnerTests {
|
||||
assertEquals(new JobParameters(), StubJobLauncher.jobParameters);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWithStdinCommandLine() throws Throwable {
|
||||
System.setIn(new InputStream() {
|
||||
char[] input = (jobPath+"\n"+jobName+"\nfoo=bar\nspam=bucket").toCharArray();
|
||||
|
||||
int index = 0;
|
||||
|
||||
public int read() {
|
||||
return index<input.length-1 ? (int) input[index++] : -1;
|
||||
}
|
||||
});
|
||||
CommandLineJobRunner.main(new String[0]);
|
||||
assertEquals(0, StubSystemExiter.status);
|
||||
assertEquals(2, StubJobLauncher.jobParameters.getParameters().size());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testWithStdinParameters() throws Throwable {
|
||||
String[] args = new String[] { jobPath, jobName };
|
||||
|
||||
Reference in New Issue
Block a user