@Test(expected = HIHOException.class) public void testCheckMandatoryConfsForJdbcUrl() throws HIHOException { String[] args = new String[] { "-inputPath", "input", "-url", "-userName", "root", "-password", "newpwd", "-querySuffix", "mrTest fields terminated by ','" }; ExportToMySQLDB exportToMySQLDB = new ExportToMySQLDB(); Configuration conf = new Configuration(); exportToMySQLDB.populateConfiguration(args, conf); exportToMySQLDB.checkMandatoryConfs(conf); }
@Test(expected = HIHOException.class) public void testCheckMandatoryConfsForQuerySuffix() throws HIHOException { String[] args = new String[] { "-inputPath", "input", "-url", "jdbc:mysql://localhost:3306/hiho", "-userName", "username", "-password", "passwd", "-querySuffix" }; ExportToMySQLDB exportToMySQLDB = new ExportToMySQLDB(); Configuration conf = new Configuration(); exportToMySQLDB.populateConfiguration(args, conf); exportToMySQLDB.checkMandatoryConfs(conf); }
@Test public void testCheckMandatoryConfsValidValues() throws HIHOException { String[] args = new String[] { "-inputPath", "input", "-url", "jdbc:mysql://localhost:3306/hiho", "-userName", "root", "-password", "newpwd", "-querySuffix", "mrTest fields terminated by ','" }; ExportToMySQLDB exportToMySQLDB = new ExportToMySQLDB(); Configuration conf = new Configuration(); exportToMySQLDB.populateConfiguration(args, conf); exportToMySQLDB.checkMandatoryConfs(conf); }