Search in sources :

Example 11 with VirtualFileClasspath

use of org.webpieces.util.file.VirtualFileClasspath in project webpieces by deanhiller.

the class TestI18n method setUp.

@Before
public void setUp() {
    VirtualFileClasspath metaFile = new VirtualFileClasspath("i18nMeta.txt", WebserverForTest.class.getClassLoader());
    WebserverForTest webserver = new WebserverForTest(platformOverrides, null, false, metaFile);
    webserver.start();
    http11Socket = http11Simulator.openHttp();
}
Also used : WebserverForTest(org.webpieces.webserver.WebserverForTest) VirtualFileClasspath(org.webpieces.util.file.VirtualFileClasspath) Before(org.junit.Before)

Example 12 with VirtualFileClasspath

use of org.webpieces.util.file.VirtualFileClasspath in project webpieces by deanhiller.

the class TestScopes method setUp.

@Before
public void setUp() {
    VirtualFileClasspath metaFile = new VirtualFileClasspath("scopesMeta.txt", WebserverForTest.class.getClassLoader());
    WebserverForTest webserver = new WebserverForTest(platformOverrides, null, false, metaFile);
    webserver.start();
    http11Socket = http11Simulator.openHttp();
}
Also used : WebserverForTest(org.webpieces.webserver.WebserverForTest) VirtualFileClasspath(org.webpieces.util.file.VirtualFileClasspath) Before(org.junit.Before)

Example 13 with VirtualFileClasspath

use of org.webpieces.util.file.VirtualFileClasspath in project webpieces by deanhiller.

the class TestHttps method setUp.

@Before
public void setUp() {
    VirtualFileClasspath metaFile = new VirtualFileClasspath("httpsMeta.txt", WebserverForTest.class.getClassLoader());
    WebserverForTest webserver = new WebserverForTest(platformOverrides, null, false, metaFile);
    webserver.start();
    httpSocket = http11Simulator.openHttp();
    httpsSocket = http11Simulator.openHttps();
}
Also used : WebserverForTest(org.webpieces.webserver.WebserverForTest) VirtualFileClasspath(org.webpieces.util.file.VirtualFileClasspath) Before(org.junit.Before)

Example 14 with VirtualFileClasspath

use of org.webpieces.util.file.VirtualFileClasspath 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)

Example 15 with VirtualFileClasspath

use of org.webpieces.util.file.VirtualFileClasspath in project webpieces by deanhiller.

the class TestAsyncWebServer method setUp.

@Before
public void setUp() {
    VirtualFileClasspath metaFile = new VirtualFileClasspath("asyncMeta.txt", WebserverForTest.class.getClassLoader());
    WebserverForTest webserver = new WebserverForTest(platformOverrides, new AppOverridesModule(), false, metaFile);
    webserver.start();
    http11Socket = http11Simulator.openHttp();
}
Also used : WebserverForTest(org.webpieces.webserver.WebserverForTest) VirtualFileClasspath(org.webpieces.util.file.VirtualFileClasspath) Before(org.junit.Before)

Aggregations

VirtualFileClasspath (org.webpieces.util.file.VirtualFileClasspath)30 Before (org.junit.Before)29 WebserverForTest (org.webpieces.webserver.WebserverForTest)29 JdbcApi (org.webpieces.ddl.api.JdbcApi)4 TestConfig (org.webpieces.webserver.TestConfig)4 SeleniumOverridesForTest (org.webpieces.webserver.test.SeleniumOverridesForTest)3 Module (com.google.inject.Module)1 FileNotFoundException (java.io.FileNotFoundException)1 InputStream (java.io.InputStream)1 Ignore (org.junit.Ignore)1 TemplateImpl (org.webpieces.templating.impl.TemplateImpl)1 VirtualFile (org.webpieces.util.file.VirtualFile)1 TagOverridesModule (org.webpieces.webserver.api.TagOverridesModule)1