Search in sources :

Example 1 with IdGenerator

use of org.molgenis.data.populate.IdGenerator in project molgenis by molgenis.

the class RestServiceTest method setUpBeforeMethod.

@BeforeMethod
public void setUpBeforeMethod() {
    dataService = mock(DataService.class);
    idGenerator = mock(IdGenerator.class);
    FileStore fileStore = mock(FileStore.class);
    fileMetaFactory = mock(FileMetaFactory.class);
    entityManager = mock(EntityManager.class);
    servletUriComponentsBuilderFactory = mock(ServletUriComponentsBuilderFactory.class);
    this.restService = new RestService(dataService, idGenerator, fileStore, fileMetaFactory, entityManager, servletUriComponentsBuilderFactory);
}
Also used : FileStore(org.molgenis.data.file.FileStore) EntityManager(org.molgenis.data.EntityManager) FileMetaFactory(org.molgenis.data.file.model.FileMetaFactory) IdGenerator(org.molgenis.data.populate.IdGenerator) DataService(org.molgenis.data.DataService) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 2 with IdGenerator

use of org.molgenis.data.populate.IdGenerator in project molgenis by molgenis.

the class OntologyTagServiceTest method beforeMethod.

@BeforeMethod
public void beforeMethod() {
    config.resetMocks();
    chromosomeNameTagEntity = tagFactory.create();
    chromosomeNameTagEntity.set(TagMetadata.ID, "1234");
    chromosomeNameTagEntity.set(TagMetadata.LABEL, "Chromosome name");
    chromosomeNameTagEntity.set(TagMetadata.OBJECT_IRI, "http://edamontology.org/data_0987");
    chromosomeNameTagEntity.set(TagMetadata.RELATION_IRI, instanceOf.getIRI());
    chromosomeNameTagEntity.set(TagMetadata.RELATION_LABEL, instanceOf.getLabel());
    chromosomeNameTagEntity.set(TagMetadata.CODE_SYSTEM, "http://edamontology.org");
    geneAnnotationTagEntity = tagFactory.create();
    geneAnnotationTagEntity.set(TagMetadata.ID, "4321");
    geneAnnotationTagEntity.set(TagMetadata.LABEL, "Gene annotation (chromosome)");
    geneAnnotationTagEntity.set(TagMetadata.OBJECT_IRI, "http://edamontology.org/data_0919");
    geneAnnotationTagEntity.set(TagMetadata.RELATION_IRI, instanceOf.getIRI());
    geneAnnotationTagEntity.set(TagMetadata.RELATION_LABEL, instanceOf.getLabel());
    geneAnnotationTagEntity.set(TagMetadata.CODE_SYSTEM, "http://edamontology.org");
    IdGenerator idGenerator = mock(IdGenerator.class);
    ontologyTagService = new OntologyTagServiceImpl(dataService, ontologyService, tagRepository, idGenerator, tagMetadata);
}
Also used : IdGenerator(org.molgenis.data.populate.IdGenerator) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 3 with IdGenerator

use of org.molgenis.data.populate.IdGenerator in project molgenis by molgenis.

the class SnpEffRunnerTest method beforeMethod.

@BeforeMethod
public void beforeMethod() throws IOException {
    jarRunner = mock(JarRunnerImpl.class);
    IdGenerator idGenerator = new IdGeneratorImpl();
    snpEffRunner = new SnpEffRunner(jarRunner, snpEffAnnotatorSettings, idGenerator, vcfAttributes, effectsMetaData, entityTypeFactory, attributeFactory);
}
Also used : IdGeneratorImpl(org.molgenis.data.populate.IdGeneratorImpl) IdGenerator(org.molgenis.data.populate.IdGenerator) JarRunnerImpl(org.molgenis.data.annotation.core.utils.JarRunnerImpl) BeforeMethod(org.testng.annotations.BeforeMethod)

Example 4 with IdGenerator

use of org.molgenis.data.populate.IdGenerator in project molgenis by molgenis.

the class PostgreSqlTransactionManagerTest method setUpBeforeMethod.

@BeforeMethod
public void setUpBeforeMethod() {
    idGenerator = mock(IdGenerator.class);
    DataSource dataSource = mock(DataSource.class);
    TransactionExceptionTranslatorRegistry transactionExceptionTranslatorRegistry = mock(TransactionExceptionTranslatorRegistry.class);
    molgenisTransactionManager = new PostgreSqlTransactionManager(idGenerator, dataSource, transactionExceptionTranslatorRegistry);
}
Also used : TransactionExceptionTranslatorRegistry(org.molgenis.data.transaction.TransactionExceptionTranslatorRegistry) IdGenerator(org.molgenis.data.populate.IdGenerator) DataSource(javax.sql.DataSource) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

IdGenerator (org.molgenis.data.populate.IdGenerator)4 BeforeMethod (org.testng.annotations.BeforeMethod)4 DataSource (javax.sql.DataSource)1 DataService (org.molgenis.data.DataService)1 EntityManager (org.molgenis.data.EntityManager)1 JarRunnerImpl (org.molgenis.data.annotation.core.utils.JarRunnerImpl)1 FileStore (org.molgenis.data.file.FileStore)1 FileMetaFactory (org.molgenis.data.file.model.FileMetaFactory)1 IdGeneratorImpl (org.molgenis.data.populate.IdGeneratorImpl)1 TransactionExceptionTranslatorRegistry (org.molgenis.data.transaction.TransactionExceptionTranslatorRegistry)1