createFile(dt, new String[] { data });
}
public String[] codeGen(DATATYPES dt) throws Exception {
CodeGenTool codeGen = new CodeGenTool();
String[] codeGenArgs = getCodeGenArgv(dt);
SqoopOptions options = codeGen.parseArguments(codeGenArgs, null, null,
true);
String username = MSSQLTestUtils.getDBUserName();
String password = MSSQLTestUtils.getDBPassWord();
options.setUsername(username);
options.setPassword(password);
codeGen.validateOptions(options);
int ret = codeGen.run(options);
assertEquals(0, ret);
List<String> generatedJars = codeGen.getGeneratedJarFiles();
assertNotNull(generatedJars);
assertEquals("Expected 1 generated jar file", 1, generatedJars.size());
String jarFileName = generatedJars.get(0);
// Sqoop generates jars named "foo.jar"; by default, this should contain