@Test public void testMultipleTestsUnderTEBASE() throws URISyntaxException { File tebase = new File(classp, "tebase"); ConfigFileCreator configFileCreator = new ConfigFileCreator(); configFileCreator.create(tebase); File configFile = new File(tebase, "config.xml"); try { Document config = builder.parse(configFile); Node node = XMLUtils.getFirstNode(config, "/config/scripts/organization[child::name/text()='OGC']/standard[child::name/text()='Catalogue Service - Web (CSW)']/" + "version[child::name/text()='3.0.0']/suite/namespace-uri"); assertTrue("The config file of a test (e.g. CAT 3.0) was copied deepely", node.getTextContent().equals("http: NodeList orgs = XMLUtils.getAllNodes(config, "/config/scripts/organization"); assertEquals("Expected 1 organization", 1, orgs.getLength()); String xpath = "/config/scripts/organization[child::name/text()='OGC']/standard[child::name/text()='Catalogue Service - Web (CSW)']/version"; NodeList vers = XMLUtils.getAllNodes(config, xpath); assertEquals("Expected 2 CSW standards", 2, vers.getLength()); } catch (SAXException e) { e.printStackTrace(); } catch (IOException e) { 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);  }