use of org.molgenis.data.RepositoryCapability in project molgenis by molgenis.
the class AbstractRepositoryTest method beforeTest.
@BeforeTest
public void beforeTest() {
MockitoAnnotations.initMocks(this);
Attribute idAttr = when(mock(Attribute.class).getName()).thenReturn("id").getMock();
entityType = when(mock(EntityType.class).getId()).thenReturn("entity").getMock();
when(entityType.getIdAttribute()).thenReturn(idAttr);
abstractRepository = Mockito.spy(new AbstractRepository() {
@Override
public Iterator<Entity> iterator() {
return null;
}
public EntityType getEntityType() {
return entityType;
}
@Override
public Set<RepositoryCapability> getCapabilities() {
return Collections.emptySet();
}
});
}
Aggregations