use of org.qi4j.bootstrap.SingletonAssembler in project qi4j-sdk by Qi4j.
the class HelloWorldTest method setUp.
@Before
public void setUp() throws Exception {
SingletonAssembler assembly = new SingletonAssembler() {
@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
module.transients(HelloWorldComposite.class);
}
};
TransientBuilderFactory builderFactory = assembly.module();
TransientBuilder<HelloWorldComposite> builder = builderFactory.newTransientBuilder(HelloWorldComposite.class);
builder.prototype().name().set("Hello");
builder.prototype().phrase().set("World");
helloWorld = builder.newInstance();
}
use of org.qi4j.bootstrap.SingletonAssembler in project qi4j-sdk by Qi4j.
the class HelloWorldTest method setUp.
@Before
public void setUp() throws Exception {
SingletonAssembler assembly = new SingletonAssembler() {
@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
module.transients(HelloWorldComposite.class);
}
};
TransientBuilderFactory builderFactory = assembly.module();
TransientBuilder<HelloWorldComposite> builder = builderFactory.newTransientBuilder(HelloWorldComposite.class);
builder.prototype().name().set("Hello");
builder.prototype().phrase().set("World");
helloWorld = builder.newInstance();
}
Aggregations