Search in sources :

Example 1 with EntityTypeCopier

use of org.molgenis.data.meta.util.EntityTypeCopier in project molgenis by molgenis.

the class PostgreSqlRepositoryCollectionDecoratorTest method setUpBeforeMethod.

@BeforeMethod
public void setUpBeforeMethod() {
    String entityTypeId = "entityTypeId";
    entityType = mock(EntityType.class);
    when(entityType.getEntityType()).thenReturn(mock(EntityType.class));
    when(entityType.getId()).thenReturn(entityTypeId);
    updatedEntityType = mock(EntityType.class);
    repoCollection = mock(RepositoryCollection.class);
    entityTypeRegistry = mock(EntityTypeRegistry.class);
    EntityTypeCopier entityTypeCopier = mock(EntityTypeCopier.class);
    when(entityTypeCopier.copy(entityType)).thenReturn(updatedEntityType);
    attributeCopier = mock(AttributeCopier.class);
    repoCollectionDecorator = new PostgreSqlRepositoryCollectionDecorator(repoCollection, entityTypeRegistry, entityTypeCopier, attributeCopier);
}
Also used : EntityType(org.molgenis.data.meta.model.EntityType) RepositoryCollection(org.molgenis.data.RepositoryCollection) EntityTypeCopier(org.molgenis.data.meta.util.EntityTypeCopier) EntityTypeRegistry(org.molgenis.data.postgresql.identifier.EntityTypeRegistry) AttributeCopier(org.molgenis.data.meta.util.AttributeCopier) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

RepositoryCollection (org.molgenis.data.RepositoryCollection)1 EntityType (org.molgenis.data.meta.model.EntityType)1 AttributeCopier (org.molgenis.data.meta.util.AttributeCopier)1 EntityTypeCopier (org.molgenis.data.meta.util.EntityTypeCopier)1 EntityTypeRegistry (org.molgenis.data.postgresql.identifier.EntityTypeRegistry)1 BeforeMethod (org.testng.annotations.BeforeMethod)1