use of org.webpieces.compiler.api.CompileConfig in project webpieces by deanhiller.
the class TestSimpleRoutes method bothServers.
@SuppressWarnings("rawtypes")
@Parameterized.Parameters
public static Collection bothServers() {
String moduleFileContents = AppModules.class.getName();
VirtualFile f = new VirtualFileInputStream(moduleFileContents.getBytes(), "testAppModules");
TestModule module = new TestModule();
RouterConfig config = new RouterConfig().setMetaFile(f).setWebappOverrides(module).setSecretKey(SecretKeyInfo.generateForTest());
RouterService prodSvc = RouterSvcFactory.create(config);
//for dev must be null
config.setWebappOverrides(null);
String filePath = System.getProperty("user.dir");
File myCodePath = new File(filePath + "/src/test/java");
CompileConfig compileConfig = new CompileConfig(new VirtualFileImpl(myCodePath));
RouterService devSvc = DevRouterFactory.create(config, compileConfig);
return Arrays.asList(new Object[][] { { prodSvc, module }, { devSvc, module } });
}
Aggregations