Search in sources :

Example 76 with EntityTestAssembler

use of org.qi4j.test.EntityTestAssembler in project qi4j-sdk by Qi4j.

the class DeclareConfigurationDefaultsTest method assemble.

public void assemble(ModuleAssembly module) throws AssemblyException {
    module.services(FooServiceComposite.class).identifiedBy("bazar");
    module.entities(FooConfigurationComposite.class);
    new EntityTestAssembler().assemble(module);
    FooConfigurationComposite config = module.forMixin(FooConfigurationComposite.class).declareDefaults();
    config.foo().set("bar");
}
Also used : EntityTestAssembler(org.qi4j.test.EntityTestAssembler)

Example 77 with EntityTestAssembler

use of org.qi4j.test.EntityTestAssembler in project qi4j-sdk by Qi4j.

the class StateFieldTest method assemble.

public void assemble(ModuleAssembly module) throws AssemblyException {
    new EntityTestAssembler().assemble(module);
    module.entities(PersonEntity.class);
}
Also used : EntityTestAssembler(org.qi4j.test.EntityTestAssembler)

Example 78 with EntityTestAssembler

use of org.qi4j.test.EntityTestAssembler in project qi4j-sdk by Qi4j.

the class ConfigurationTest method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    module.services(MyService.class).instantiateOnStartup();
    module.entities(MyConfig.class);
    module.values(PersonDetails.class, Address.class, City.class, Country.class);
    new EntityTestAssembler().assemble(module);
}
Also used : EntityTestAssembler(org.qi4j.test.EntityTestAssembler)

Example 79 with EntityTestAssembler

use of org.qi4j.test.EntityTestAssembler in project qi4j-sdk by Qi4j.

the class PropertyErrorTest method assemble.

public void assemble(ModuleAssembly module) throws AssemblyException {
    new EntityTestAssembler().assemble(module);
    module.entities(PersonEntity.class);
}
Also used : EntityTestAssembler(org.qi4j.test.EntityTestAssembler)

Example 80 with EntityTestAssembler

use of org.qi4j.test.EntityTestAssembler in project qi4j-sdk by Qi4j.

the class IterableQuerySourceTest method setUp.

@Before
public void setUp() throws UnitOfWorkCompletionException, ActivationException, AssemblyException {
    SingletonAssembler assembler = new SingletonAssembler() {

        public void assemble(ModuleAssembly module) throws AssemblyException {
            Iterable<Class<?>> entities = ClassScanner.findClasses(DomainEntity.class);
            for (Class entity : entities) {
                module.entities(entity);
            }
            module.values(ContactsValue.class, ContactValue.class);
            new EntityTestAssembler().assemble(module);
        }
    };
    uow = assembler.module().newUnitOfWork();
    Network.populate(uow, assembler.module());
    uow.complete();
    uow = assembler.module().newUnitOfWork();
    Network.refresh(uow);
    qbf = assembler.module();
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) SingletonAssembler(org.qi4j.bootstrap.SingletonAssembler) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) Before(org.junit.Before)

Aggregations

EntityTestAssembler (org.qi4j.test.EntityTestAssembler)137 ModuleAssembly (org.qi4j.bootstrap.ModuleAssembly)51 OrgJsonValueSerializationAssembler (org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationAssembler)20 SingletonAssembler (org.qi4j.bootstrap.SingletonAssembler)13 RdfMemoryStoreAssembler (org.qi4j.index.rdf.assembly.RdfMemoryStoreAssembler)10 Test (org.junit.Test)9 FileConfigurationService (org.qi4j.library.fileconfig.FileConfigurationService)8 DataSourceAssembler (org.qi4j.library.sql.assembly.DataSourceAssembler)8 NativeConfiguration (org.qi4j.library.rdf.repository.NativeConfiguration)7 AssemblyException (org.qi4j.bootstrap.AssemblyException)6 ShiroIniConfiguration (org.qi4j.library.shiro.ini.ShiroIniConfiguration)6 DBCPDataSourceServiceAssembler (org.qi4j.library.sql.dbcp.DBCPDataSourceServiceAssembler)6 File (java.io.File)5 UnitOfWork (org.qi4j.api.unitofwork.UnitOfWork)5 RdfNativeSesameStoreAssembler (org.qi4j.index.rdf.assembly.RdfNativeSesameStoreAssembler)5 Module (org.qi4j.api.structure.Module)4 JdbmConfiguration (org.qi4j.entitystore.jdbm.JdbmConfiguration)4 JdbmEntityStoreAssembler (org.qi4j.entitystore.jdbm.assembly.JdbmEntityStoreAssembler)4 ESFilesystemIndexQueryAssembler (org.qi4j.index.elasticsearch.assembly.ESFilesystemIndexQueryAssembler)4 CurrentUserUoWPrincipal (org.qi4j.library.eventsourcing.domain.factory.CurrentUserUoWPrincipal)4