use of org.webpieces.webserver.PrivateWebserverForTest in project webpieces by deanhiller.
the class TestAsyncHibernate method setUp.
@Before
public void setUp() throws InterruptedException, ExecutionException, TimeoutException {
// 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", PrivateWebserverForTest.class.getClassLoader());
PrivateTestConfig config = new PrivateTestConfig();
config.setPlatformOverrides(getOverrides(false, new SimpleMeterRegistry()));
config.setAppOverrides(new TestOverrides());
config.setMetaFile(metaFile);
PrivateWebserverForTest webserver = new PrivateWebserverForTest(config);
webserver.start();
http11Socket = connectHttp(false, webserver.getUnderlyingHttpChannel().getLocalAddress());
}
use of org.webpieces.webserver.PrivateWebserverForTest in project webpieces by deanhiller.
the class TestAjaxHibernate method setUp.
@Before
public void setUp() throws InterruptedException, ExecutionException, TimeoutException {
// clear in-memory database
JdbcApi jdbc = JdbcFactory.create(JdbcConstants.jdbcUrl, JdbcConstants.jdbcUser, JdbcConstants.jdbcPassword);
jdbc.dropAllTablesFromDatabase();
VirtualFileClasspath metaFile = new VirtualFileClasspath("plugins/hibernateMeta.txt", PrivateWebserverForTest.class.getClassLoader());
PrivateTestConfig config = new PrivateTestConfig();
config.setPlatformOverrides(getOverrides(false, new SimpleMeterRegistry()));
config.setAppOverrides(new TestModule());
config.setMetaFile(metaFile);
PrivateWebserverForTest webserver = new PrivateWebserverForTest(config);
webserver.start();
http11Socket = connectHttp(false, webserver.getUnderlyingHttpChannel().getLocalAddress());
}
use of org.webpieces.webserver.PrivateWebserverForTest in project webpieces by deanhiller.
the class TestFlashAndSelect method setUp.
@Before
public void setUp() throws InterruptedException, ExecutionException, TimeoutException {
// 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", PrivateWebserverForTest.class.getClassLoader());
PrivateTestConfig config = new PrivateTestConfig();
config.setPlatformOverrides(getOverrides(false, new SimpleMeterRegistry()));
config.setMetaFile(metaFile);
config.setAppOverrides(new TestModule(mock));
PrivateWebserverForTest webserver = new PrivateWebserverForTest(config);
webserver.start();
http11Socket = connectHttp(false, webserver.getUnderlyingHttpChannel().getLocalAddress());
}
use of org.webpieces.webserver.PrivateWebserverForTest in project webpieces by deanhiller.
the class TestTokenDollarSign method setUp.
@Before
public void setUp() throws InterruptedException, ExecutionException, TimeoutException {
VirtualFileClasspath metaFile = new VirtualFileClasspath("tokensMeta.txt", PrivateWebserverForTest.class.getClassLoader());
PrivateWebserverForTest webserver = new PrivateWebserverForTest(getOverrides(false, new SimpleMeterRegistry()), null, false, metaFile);
webserver.start();
http11Socket = connectHttp(false, webserver.getUnderlyingHttpChannel().getLocalAddress());
}
use of org.webpieces.webserver.PrivateWebserverForTest in project webpieces by deanhiller.
the class TestIncludeTypeTags method setUp.
@Before
public void setUp() throws InterruptedException, ExecutionException, TimeoutException {
Module allOverrides = Modules.combine(getOverrides(false, new SimpleMeterRegistry()), new TagOverridesModule(TagOverrideLookupForTesting.class));
VirtualFileClasspath metaFile = new VirtualFileClasspath("tagsMeta.txt", PrivateWebserverForTest.class.getClassLoader());
PrivateWebserverForTest webserver = new PrivateWebserverForTest(allOverrides, null, false, metaFile);
webserver.start();
http11Socket = connectHttp(false, webserver.getUnderlyingHttpChannel().getLocalAddress());
}
Aggregations