@Test public void testParsingMultipleOranizations() { try { File tebase = new File(classp, "tebase-multiple-organizations"); ConfigFileCreator configFileCreator = new ConfigFileCreator(); configFileCreator.create(tebase); File configFile = new File(tebase + File.separator + "config.xml"); Document config = builder.parse(configFile); NodeList orgs = XMLUtils.getAllNodes(config, "/config/scripts/organization"); assertEquals(2, orgs.getLength()); configFile.delete(); } catch (Exception e) { fail(); e.printStackTrace(); } }
public void create(String tebase) throws TEException { File f = new File(tebase); if (f.exists()) { try { process(tebase); } catch (Exception e) { e.printStackTrace(); } } else { throw new TEBaseNotFoundException(tebase); } }
ConfigFileCreator { public void create(String tebase) throws TEException { File f = new File(tebase); if (f.exists()) { try { process(tebase); } catch (Exception e) { e.printStackTrace(); } } else { throw new TEBaseNotFoundException(tebase); } } }
ConfigFileCreator { public void create(String tebase) throws TEException { File f = new File(tebase); if (f.exists()) { try { process(tebase); } catch (Exception e) { e.printStackTrace(); } } else { throw new TEBaseNotFoundException(tebase); } } ConfigFileCreator(); }
ConfigFileCreator { public void create(String tebase) throws TEException { File f = new File(tebase); if (f.exists()) { try { process(tebase); } catch (Exception e) { e.printStackTrace(); } } else { throw new TEBaseNotFoundException(tebase); } } ConfigFileCreator(); void create(String tebase); void create(File tebase); void processDir(File dir); void saveConfigFile(Document docMain, String mainconfig); Document getDocument(File xml); }
ConfigFileCreator { public void create(String tebase) throws TEException { File f = new File(tebase); if (f.exists()) { try { process(tebase); } catch (Exception e) { e.printStackTrace(); } } else { throw new TEBaseNotFoundException(tebase); } } ConfigFileCreator(); void create(String tebase); void create(File tebase); void processDir(File dir); void saveConfigFile(Document docMain, String mainconfig); Document getDocument(File xml);  }