use of com.enonic.xp.core.impl.app.ApplicationBuilder in project xp by enonic.
the class ScriptTestSupport method createApplication.
private Application createApplication() throws Exception {
final ApplicationBuilder builder = new ApplicationBuilder();
builder.classLoader(getClass().getClassLoader());
URL[] resourcesPath = { Path.of("src/test/resources").toUri().toURL() };
URLClassLoader loader = new URLClassLoader(resourcesPath, ClassLoader.getPlatformClassLoader());
builder.urlResolver(new ClassLoaderApplicationUrlResolver(loader));
builder.config(ConfigBuilder.create().build());
builder.bundle(createBundle());
return builder.build();
}
Aggregations