use of org.obeonetwork.dsl.database.reverse.utils.MultiDataBaseQueries in project InformationSystem by ObeoNetwork.
the class TestReverse method testH2Server.
@Test
public void testH2Server() {
String databaseLocation = getH2DatabaseLocation(this.getClass(), "input");
DataSource dataSource = new DataSource("appli1", "PUBLIC");
dataSource.setJdbcUrl("jdbc:h2:tcp://localhost/" + databaseLocation);
dataSource.setJdbcUsername("sa");
dataSource.setVendor("H2-1.3");
DataBase database = DatabaseReverser.reverse(dataSource, new MultiDataBaseQueries(), null);
DataBase databaseRef = loadModel("resources/h2/outputRef.database", "pathmap://NativeDBTypes/H2-1.3");
checkEquality(database, databaseRef);
}
use of org.obeonetwork.dsl.database.reverse.utils.MultiDataBaseQueries in project InformationSystem by ObeoNetwork.
the class TestReverse method testPostgres.
@Test
public void testPostgres() {
DataSource dataSource = new DataSource("postgres", "public");
dataSource.setJdbcUrl("jdbc:postgresql://localhost:5432/postgres");
dataSource.setJdbcUsername("postgres");
dataSource.setJdbcPassword("admin");
dataSource.setVendor("Postgres-9");
DataBase database = DatabaseReverser.reverse(dataSource, new MultiDataBaseQueries(), null);
DataBase databaseRef = loadModel("resources/postgres/outputRef.database", "pathmap://NativeDBTypes/Postgres-9");
checkEquality(database, databaseRef);
}
Aggregations