OBridge { public void generate(OBridgeConfiguration c) { PopulateObjectsTable.run(c); EntityObjectGenerator.generate(c); ConverterObjectGenerator.generate(c); ProcedureContextGenerator.generate(c); PackageObjectGenerator.generate(c); }  static void main(String... args); void generate(OBridgeConfiguration c); OBridgeConfiguration loadConfiguration(File f); void generate(File f);  }
@Test public void fullTest() throws IOException, InterruptedException { Properties p = new Properties(); p.load(getClass().getClassLoader().getResourceAsStream("datasource.properties")); OBridgeConfiguration oBridgeConfiguration = new OBridgeConfiguration(); oBridgeConfiguration.setJdbcUrl(p.getProperty("connectionString")); oBridgeConfiguration.setPackages(new Packages()); oBridgeConfiguration.setRootPackageName("org.obridge.test"); oBridgeConfiguration.setSourceRoot(tempdir.getRoot().getAbsolutePath()); oBridgeConfiguration.setSourceOwner("OBRIDGE"); new OBridge().generate(oBridgeConfiguration); Assert.assertTrue(tempdir.getRoot().exists()); Assert.assertTrue(new File(tempdir.getRoot().getAbsolutePath() + "\\org\\obridge\\test\\converters\\PrimitiveTypeConverter.java").exists()); Assert.assertTrue(new File(tempdir.getRoot().getAbsolutePath() + "\\org\\obridge\\test\\packages\\ProceduresAndFunctions.java").exists()); Assert.assertTrue(new File(tempdir.getRoot().getAbsolutePath() + "\\org\\obridge\\test\\packages\\TestPackage.java").exists()); }