Search in sources :

Example 1 with JdbcApi

use of org.webpieces.ddl.api.JdbcApi in project webpieces by deanhiller.

the class TestAjaxHibernate method setUp.

@Before
public void setUp() {
    //clear in-memory database
    JdbcApi jdbc = JdbcFactory.create(JdbcConstants.jdbcUrl, JdbcConstants.jdbcUser, JdbcConstants.jdbcPassword);
    jdbc.dropAllTablesFromDatabase();
    VirtualFileClasspath metaFile = new VirtualFileClasspath("plugins/hibernateMeta.txt", WebserverForTest.class.getClassLoader());
    TestConfig config = new TestConfig();
    config.setPlatformOverrides(platformOverrides);
    config.setAppOverrides(new TestModule());
    config.setMetaFile(metaFile);
    WebserverForTest webserver = new WebserverForTest(config);
    webserver.start();
    http11Socket = http11Simulator.openHttp();
}
Also used : TestConfig(org.webpieces.webserver.TestConfig) WebserverForTest(org.webpieces.webserver.WebserverForTest) VirtualFileClasspath(org.webpieces.util.file.VirtualFileClasspath) JdbcApi(org.webpieces.ddl.api.JdbcApi) Before(org.junit.Before)

Example 2 with JdbcApi

use of org.webpieces.ddl.api.JdbcApi in project webpieces by deanhiller.

the class TestAsyncHibernate method setUp.

@Before
public void setUp() {
    //clear in-memory database
    JdbcApi jdbc = JdbcFactory.create(JdbcConstants.jdbcUrl, JdbcConstants.jdbcUser, JdbcConstants.jdbcPassword);
    jdbc.dropAllTablesFromDatabase();
    mockExecutor.clear();
    VirtualFileClasspath metaFile = new VirtualFileClasspath("plugins/hibernateMeta.txt", WebserverForTest.class.getClassLoader());
    TestConfig config = new TestConfig();
    config.setPlatformOverrides(platformOverrides);
    config.setAppOverrides(new TestOverrides());
    config.setMetaFile(metaFile);
    WebserverForTest webserver = new WebserverForTest(config);
    webserver.start();
    http11Socket = http11Simulator.openHttp();
}
Also used : TestConfig(org.webpieces.webserver.TestConfig) WebserverForTest(org.webpieces.webserver.WebserverForTest) VirtualFileClasspath(org.webpieces.util.file.VirtualFileClasspath) JdbcApi(org.webpieces.ddl.api.JdbcApi) Before(org.junit.Before)

Example 3 with JdbcApi

use of org.webpieces.ddl.api.JdbcApi in project webpieces by deanhiller.

the class TestFlashAndSelect method setUp.

@Before
public void setUp() {
    //clear in-memory database
    JdbcApi jdbc = JdbcFactory.create(JdbcConstants.jdbcUrl, JdbcConstants.jdbcUser, JdbcConstants.jdbcPassword);
    jdbc.dropAllTablesFromDatabase();
    user = loadDataInDb();
    VirtualFileClasspath metaFile = new VirtualFileClasspath("plugins/hibernateMeta.txt", WebserverForTest.class.getClassLoader());
    TestConfig config = new TestConfig();
    config.setPlatformOverrides(platformOverrides);
    config.setMetaFile(metaFile);
    config.setAppOverrides(new TestModule(mock));
    WebserverForTest webserver = new WebserverForTest(config);
    webserver.start();
    http11Socket = http11Simulator.openHttp();
}
Also used : TestConfig(org.webpieces.webserver.TestConfig) WebserverForTest(org.webpieces.webserver.WebserverForTest) VirtualFileClasspath(org.webpieces.util.file.VirtualFileClasspath) JdbcApi(org.webpieces.ddl.api.JdbcApi) Before(org.junit.Before)

Example 4 with JdbcApi

use of org.webpieces.ddl.api.JdbcApi in project webpieces by deanhiller.

the class TestSyncHibernate method setUp.

@Before
public void setUp() {
    //clear in-memory database
    JdbcApi jdbc = JdbcFactory.create(JdbcConstants.jdbcUrl, JdbcConstants.jdbcUser, JdbcConstants.jdbcPassword);
    jdbc.dropAllTablesFromDatabase();
    VirtualFileClasspath metaFile = new VirtualFileClasspath("plugins/hibernateMeta.txt", WebserverForTest.class.getClassLoader());
    TestConfig config = new TestConfig();
    config.setPlatformOverrides(platformOverrides);
    config.setMetaFile(metaFile);
    config.setAppOverrides(new TestModule(mock));
    WebserverForTest webserver = new WebserverForTest(config);
    webserver.start();
    http11Socket = http11Simulator.openHttp();
}
Also used : TestConfig(org.webpieces.webserver.TestConfig) WebserverForTest(org.webpieces.webserver.WebserverForTest) VirtualFileClasspath(org.webpieces.util.file.VirtualFileClasspath) JdbcApi(org.webpieces.ddl.api.JdbcApi) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)4 JdbcApi (org.webpieces.ddl.api.JdbcApi)4 VirtualFileClasspath (org.webpieces.util.file.VirtualFileClasspath)4 TestConfig (org.webpieces.webserver.TestConfig)4 WebserverForTest (org.webpieces.webserver.WebserverForTest)4