Пример #1
0
 @Test
 public void testParserNoClusterNoTasks() throws Exception {
   String jar = "mr4c.jar";
   String uri = "input.conf";
   String[] args = new String[] {jar, uri};
   MR4CArgumentParser parser = new MR4CArgumentParser(args, USAGE);
   parser.parse();
   assertEquals(jar, parser.getJar());
   assertEquals(URI.create(uri), parser.getExeConf());
   assertNull(parser.getCluster());
   assertNull(parser.getTasks());
 }
Пример #2
0
 @Test
 public void testParserAllArgs() throws Exception {
   String jar = "mr4c.jar";
   String uri = "input.conf";
   String cluster = "dev";
   Integer tasks = 5;
   String[] args = new String[] {jar, uri, cluster, Integer.toString(tasks)};
   MR4CArgumentParser parser = new MR4CArgumentParser(args, USAGE);
   parser.parse();
   assertEquals(jar, parser.getJar());
   assertEquals(URI.create(uri), parser.getExeConf());
   assertEquals(tasks, parser.getTasks());
   assertEquals(cluster, parser.getCluster());
 }