Search in sources :

Example 31 with EntityTestAssembler

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

the class RdfQueryTest method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    super.assemble(module);
    module.services(FileConfigurationService.class);
    module.services(NativeRepositoryService.class, RdfQueryParserFactory.class).instantiateOnStartup();
    module.services(RdfIndexingEngineService.class).instantiateOnStartup();
    module.services(OrgJsonValueSerializationService.class).taggedWith(ValueSerialization.Formats.JSON);
    module.objects(EntityStateSerializer.class, EntityTypeSerializer.class);
    ModuleAssembly config = module.layer().module("Config");
    config.entities(NativeConfiguration.class).visibleIn(Visibility.layer);
    new EntityTestAssembler().assemble(config);
}
Also used : NativeRepositoryService(org.qi4j.library.rdf.repository.NativeRepositoryService) ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) OrgJsonValueSerializationService(org.qi4j.valueserialization.orgjson.OrgJsonValueSerializationService) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) RdfQueryParserFactory(org.qi4j.index.rdf.query.RdfQueryParserFactory) NativeConfiguration(org.qi4j.library.rdf.repository.NativeConfiguration)

Example 32 with EntityTestAssembler

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

the class AbstractIssueTest method assemble.

public final void assemble(ModuleAssembly aModuleAssembly) throws AssemblyException {
    aModuleAssembly.entities(AccountComposite.class);
    new EntityTestAssembler().assemble(aModuleAssembly);
    aModuleAssembly.services(MemoryRepositoryService.class);
    onAssemble(aModuleAssembly);
}
Also used : EntityTestAssembler(org.qi4j.test.EntityTestAssembler)

Example 33 with EntityTestAssembler

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

the class ElasticSearchTest method assemble.

@Override
public void assemble(ModuleAssembly module) throws AssemblyException {
    // Config module
    ModuleAssembly config = module.layer().module("config");
    new EntityTestAssembler().assemble(config);
    // EntityStore
    new EntityTestAssembler().assemble(module);
    // Index/Query
    new ESFilesystemIndexQueryAssembler().withConfigModule(config).withConfigVisibility(Visibility.layer).assemble(module);
    ElasticSearchConfiguration esConfig = config.forMixin(ElasticSearchConfiguration.class).declareDefaults();
    esConfig.indexNonAggregatedAssociations().set(Boolean.TRUE);
    // FileConfig
    FileConfigurationOverride override = new FileConfigurationOverride().withData(new File("build/qi4j-data")).withLog(new File("build/qi4j-logs")).withTemporary(new File("build/qi4j-temp"));
    module.services(FileConfigurationService.class).setMetaInfo(override);
    // Entities & Values
    module.entities(Post.class, Page.class, Author.class, Comment.class);
    module.values(Tagline.class);
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) ESFilesystemIndexQueryAssembler(org.qi4j.index.elasticsearch.assembly.ESFilesystemIndexQueryAssembler) FileConfigurationService(org.qi4j.library.fileconfig.FileConfigurationService) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) FileConfigurationOverride(org.qi4j.library.fileconfig.FileConfigurationOverride) File(java.io.File) FileConfigurationOverride(org.qi4j.library.fileconfig.FileConfigurationOverride)

Example 34 with EntityTestAssembler

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

the class ContainsAllTest method assemble.

// This test creates a one-layer, two-module application, with one module
// being testing module, and another for retrieving configuration for
// services from preferences. This test assumes that those configurations
// already exist in preference ES.
public void assemble(ModuleAssembly module) throws AssemblyException {
    module.services(FileConfigurationService.class);
    ModuleAssembly prefModule = module.layer().module("PrefModule");
    prefModule.entities(NativeConfiguration.class).visibleIn(Visibility.application);
    new EntityTestAssembler().assemble(prefModule);
    module.entities(ExampleEntity.class);
    module.values(ExampleValue.class, ExampleValue2.class);
    EntityTestAssembler testAss = new EntityTestAssembler();
    testAss.assemble(module);
    RdfNativeSesameStoreAssembler rdfAssembler = new RdfNativeSesameStoreAssembler();
    rdfAssembler.assemble(module);
}
Also used : ModuleAssembly(org.qi4j.bootstrap.ModuleAssembly) RdfNativeSesameStoreAssembler(org.qi4j.index.rdf.assembly.RdfNativeSesameStoreAssembler) EntityTestAssembler(org.qi4j.test.EntityTestAssembler) NativeConfiguration(org.qi4j.library.rdf.repository.NativeConfiguration)

Example 35 with EntityTestAssembler

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

the class Qi173IssueTest method assemble.

public void assemble(ModuleAssembly module) throws AssemblyException {
    module.entities(CarEntity.class);
    new RdfMemoryStoreAssembler().assemble(module);
    new EntityTestAssembler().assemble(module);
}
Also used : RdfMemoryStoreAssembler(org.qi4j.index.rdf.assembly.RdfMemoryStoreAssembler) EntityTestAssembler(org.qi4j.test.EntityTestAssembler)

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