use of org.qi4j.bootstrap.ModuleAssembly in project qi4j-sdk by Qi4j.
the class TransientBuilderFactoryTest method newInstanceForNullType.
/**
* Tests that a transient composite instance cannot be created for a 'null' type.
*
* @throws Exception expected
*/
@Test(expected = NullArgumentException.class)
public void newInstanceForNullType() throws Exception {
SingletonAssembler assembler = new SingletonAssembler() {
public void assemble(ModuleAssembly module) throws AssemblyException {
}
};
assembler.module().newTransient(null);
}
use of org.qi4j.bootstrap.ModuleAssembly in project qi4j-sdk by Qi4j.
the class InstanceImporterTest method assemble.
public void assemble(ModuleAssembly module) throws AssemblyException {
ModuleAssembly serviceModule = module.layer().module("Service module");
serviceModule.importedServices(TestInterface.class).setMetaInfo(new TestService()).visibleIn(Visibility.layer);
module.objects(InstanceImporterTest.class);
}
use of org.qi4j.bootstrap.ModuleAssembly in project qi4j-sdk by Qi4j.
the class FileEntityStoreTest method assemble.
@Override
public // START SNIPPET: assembly
void assemble(ModuleAssembly module) throws AssemblyException {
// END SNIPPET: assembly
super.assemble(module);
module.services(FileConfigurationService.class);
ModuleAssembly config = module.layer().module("config");
new EntityTestAssembler().assemble(config);
new OrgJsonValueSerializationAssembler().assemble(module);
// START SNIPPET: assembly
new FileEntityStoreAssembler().withConfig(config, Visibility.layer).assemble(module);
}
use of org.qi4j.bootstrap.ModuleAssembly in project qi4j-sdk by Qi4j.
the class EhCacheTest method assemble.
@Override
public // START SNIPPET: assembly
void assemble(ModuleAssembly module) throws AssemblyException {
// END SNIPPET: assembly
ModuleAssembly confModule = module.layer().module("confModule");
new EntityTestAssembler().visibleIn(Visibility.layer).assemble(confModule);
// START SNIPPET: assembly
new EhCacheAssembler().withConfig(confModule, Visibility.layer).assemble(module);
}
use of org.qi4j.bootstrap.ModuleAssembly in project qi4j-sdk by Qi4j.
the class RiakHttpMapEntityStoreTest method assemble.
@Override
public // START SNIPPET: assembly
void assemble(ModuleAssembly module) throws AssemblyException {
// END SNIPPET: assembly
super.assemble(module);
ModuleAssembly config = module.layer().module("config");
new EntityTestAssembler().assemble(config);
new OrgJsonValueSerializationAssembler().assemble(module);
// START SNIPPET: assembly
new RiakHttpMapEntityStoreAssembler().withConfig(config, Visibility.layer).assemble(module);
}
Aggregations