use of org.qi4j.test.EntityTestAssembler in project qi4j-sdk by Qi4j.
the class PasswordDomainTest method assemble.
// END SNIPPET: domain
// START SNIPPET: assembly
@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
// END SNIPPET: assembly
new EntityTestAssembler().assemble(module);
new RdfMemoryStoreAssembler().assemble(module);
ModuleAssembly configModule = module;
// START SNIPPET: assembly
new StandaloneShiroAssembler().withConfig(configModule).assemble(module);
new PasswordDomainAssembler().withConfig(configModule).assemble(module);
module.entities(User.class);
module.services(UserFactory.class);
// END SNIPPET: assembly
configModule.forMixin(ShiroIniConfiguration.class).declareDefaults().iniResourcePath().set("classpath:standalone-shiro.ini");
// START SNIPPET: assembly
}
use of org.qi4j.test.EntityTestAssembler in project qi4j-sdk by Qi4j.
the class WebRealmServiceTest method assemble.
@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
try {
new EntityTestAssembler().assemble(module);
ModuleAssembly configModule = module;
// START SNIPPET: assembly
new JettyServiceAssembler().assemble(module);
// END SNIPPET: assembly
port = FreePortFinder.findFreePortOnLoopback();
JettyConfiguration config = module.forMixin(JettyConfiguration.class).declareDefaults();
config.hostName().set("127.0.0.1");
config.port().set(port);
// START SNIPPET: assembly
new HttpShiroAssembler().withConfig(configModule).assemble(module);
module.services(MyRealmService.class);
// END SNIPPET: assembly
configModule.forMixin(ShiroIniConfiguration.class).declareDefaults().iniResourcePath().set("classpath:web-shiro.ini");
addServlets(serve("/*").with(MyServletService.class)).to(module);
} catch (IOException ex) {
throw new AssemblyException("Unable to find free port to bind to", ex);
}
}
use of org.qi4j.test.EntityTestAssembler in project qi4j-sdk by Qi4j.
the class StandaloneShiroTest method assemble.
@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
new EntityTestAssembler().assemble(module);
ModuleAssembly configModule = module;
// START SNIPPET: assembly
new StandaloneShiroAssembler().withConfig(configModule).assemble(module);
// END SNIPPET: assembly
configModule.forMixin(ShiroIniConfiguration.class).declareDefaults().iniResourcePath().set("classpath:standalone-shiro.ini");
}
use of org.qi4j.test.EntityTestAssembler in project qi4j-sdk by Qi4j.
the class AssemblyMixinTest method assemble.
public void assemble(ModuleAssembly module) throws AssemblyException {
new EntityTestAssembler().assemble(module);
module.transients(FooComposite.class).withMixins(CustomFooMixin.class);
module.entities(FooEntity.class).withMixins(FooMixin.class);
}
use of org.qi4j.test.EntityTestAssembler in project qi4j-sdk by Qi4j.
the class ImmutablePropertyTest method assemble.
public final void assemble(ModuleAssembly module) throws AssemblyException {
module.transients(LocationComposite.class);
module.entities(LocationEntity.class);
new EntityTestAssembler().assemble(module);
}
Aggregations