@Test public void generateCodeShouldSucceed() throws Exception { Configuration configuration = TestTool.createGeneratorConfig( FutureAsyncVertxGenerator.class.getName(),"future.async.vertx", FutureAsyncGeneratorStrategy.class); try { GenerationTool.generate(configuration); Assert.assertTrue(true); } catch (Exception e) { e.printStackTrace(); Assert.fail(e.getMessage()); } }
@Test public void generateCodeShouldSucceed() throws Exception { Configuration configuration = TestTool.createGeneratorConfig( RXAsyncVertxGenerator.class.getName(), "rx.async.vertx", RXAsyncGeneratorStrategy.class); try { GenerationTool.generate(configuration); Assert.assertTrue(true); } catch (Exception e) { e.printStackTrace(); Assert.fail(e.getMessage()); } }
@Test public void generateCodeShouldSucceed() throws Exception { Configuration configuration = TestTool.createGeneratorConfig( ClassicAsyncVertxGenerator.class.getName(),"classic.async.vertx", ClassicAsyncGeneratorStrategy.class); try { GenerationTool.generate(configuration); Assert.assertTrue(true); } catch (Exception e) { e.printStackTrace(); Assert.fail(e.getMessage()); } }
private void generate(Configuration configuration) { try { GenerationTool.generate(configuration); } catch (Exception e) { throw new RuntimeException("Model generation in " + configuration.getGenerator().getTarget().getDirectory() + " failed", e); } }
public void generate() throws Exception { Configuration configuration = new Configuration() .withJdbc(new Jdbc() .withDriver(dialect.getDriverClassName()) .withUrl(getUrl()) .withUsername(user) .withPassword(password)) .withGenerator(new Generator() .withName(CarbonJooqGenerator.class.getName()) .withGenerate(new Generate() .withRelations(true) .withImmutablePojos(false) // if true, cannot use 'into()' method .withInterfaces(true) .withDaos(true)) .withDatabase(new Database() .withName(getJooqDBClassName()) .withIncludes(".*") .withExcludes("") .withInputSchema(db) .withForcedTypes(new ForcedType() .withUserType(LocalDateTime.class.getName()) .withConverter(LocalDateTimeConverter.class.getName()) .withTypes("DATETIME")) ) .withTarget(new Target() .withPackageName(packageName) .withDirectory(outputDir.getAbsolutePath()))); GenerationTool.generate(configuration); }
@Test public void generateCodeShouldSucceed() throws Exception { Configuration configuration = TestTool.createGeneratorConfig( ClassicVertxGenerator.class.getName(),"classic.asindb", ClassicAsInDBGeneratorStrategy.class); try { GenerationTool.generate(configuration); Assert.assertTrue(true); } catch (Exception e) { e.printStackTrace(); Assert.fail(e.getMessage()); } }
@Test public void generateCodeShouldSucceed() throws Exception { Configuration configuration = TestTool.createGeneratorConfig( ClassicVertxGenerator.class.getName(),"classic.lowercase", ToLowerCaseGeneratorStrategy.class); try { GenerationTool.generate(configuration); Assert.assertTrue(true); } catch (Exception e) { e.printStackTrace(); Assert.fail(e.getMessage()); } }
@Test public void generateCodeShouldSucceed() throws Exception { Configuration configuration = TestTool.createGeneratorConfig( FutureVertxGenerator.class.getName(),"future.vertx", FutureGeneratorStrategy.class); try { GenerationTool.generate(configuration); Assert.assertTrue(true); } catch (Exception e) { e.printStackTrace(); Assert.fail(e.getMessage()); } }
@Test public void generateCodeShouldSucceed() throws Exception { Configuration configuration = TestTool.createGeneratorConfig( FutureVertxGuiceGenerator.class.getName(),"future.guice", FutureGeneratorStrategy.class); try { GenerationTool.generate(configuration); Assert.assertTrue(true); } catch (Exception e) { e.printStackTrace(); Assert.fail(e.getMessage()); } }
@Test public void generateCodeShouldSucceed() throws Exception { Configuration configuration = TestTool.createGeneratorConfig( RXVertxGenerator.class.getName(),"rx.vertx", RXGeneratorStrategy.class); try { GenerationTool.generate(configuration); Assert.assertTrue(true); } catch (Exception e) { e.printStackTrace(); Assert.fail(e.getMessage()); } }
@Test public void generateCodeShouldSucceed() throws Exception { Configuration configuration = TestTool.createGeneratorConfig( RXVertxGuiceGenerator.class.getName(),"rx.guice", RXGeneratorStrategy.class); try { GenerationTool.generate(configuration); Assert.assertTrue(true); } catch (Exception e) { e.printStackTrace(); Assert.fail(e.getMessage()); } }
@Test public void generateCodeShouldSucceed() throws Exception { Configuration configuration = TestTool.createGeneratorConfig( ClassicVertxGenerator.class.getName(),"classic.vertx", ClassicGeneratorStrategy.class); try { GenerationTool.generate(configuration); Assert.assertTrue(true); } catch (Exception e) { e.printStackTrace(); Assert.fail(e.getMessage()); } }
@Test public void generateCodeShouldSucceed() throws Exception { Configuration configuration = TestTool.createGeneratorConfig( ClassicVertxGuiceGenerator.class.getName(),"classic.guice", ClassicGeneratorStrategy.class); try { GenerationTool.generate(configuration); Assert.assertTrue(true); } catch (Exception e) { e.printStackTrace(); Assert.fail(e.getMessage()); } }
public static void main(String[] args) throws Exception { GenerationTool.main(new String[] { CodeGenerator.class.getResource("jooq.xml").getFile() }); }