use of org.apache.tapestry5.http.services.ApplicationGlobals in project tapestry-5 by apache.
the class JpaTest method setupRegistry.
// @BeforeSuite
public final void setupRegistry() {
RegistryBuilder builder = new RegistryBuilder();
builder.add(TapestryModule.class);
builder.add(JpaModule.class);
builder.add(JpaTestModule.class);
registry = builder.build();
// set PageTesterContext, otherwise T5 tries to load classpath assets
ApplicationGlobals globals = registry.getObject(ApplicationGlobals.class, null);
globals.storeContext(new PageTesterContext(""));
registry.performRegistryStartup();
entityManagerManager = registry.getService(EntityManagerManager.class);
topLevelService = registry.getService(TopLevelService.class);
}
Aggregations