예제 #1
0
  @Before
  public void beforeEach() {
    // Set the connection properties using the environment defined in the POM files ...
    source = new JpaSource();

    source.setModel(JpaSource.Models.SIMPLE.getName());
    source.setName("SimpleJpaSource");
    source.setDialect("org.hibernate.dialect.HSQLDialect");
    source.setDriverClassName("org.hsqldb.jdbcDriver");
    source.setUsername("sa");
    source.setPassword("");
    source.setUrl("jdbc:hsqldb:mem:.");
    source.setShowSql(false);
    source.setAutoGenerateSchema("create");

    source.initialize(new MockRepositoryContext());
  }
예제 #2
0
 @Test
 public void shouldCreateLiveConnection() throws InterruptedException {
   RepositoryConnection connection = source.getConnection();
   connection.ping(1, TimeUnit.SECONDS);
   connection.close();
 }