use of org.molgenis.data.meta.model.EntityTypeFactory in project molgenis by molgenis.
the class VcfRepositoryTest method testGetEntityType.
// Regression test for https://github.com/molgenis/molgenis/issues/6528
@Test(expectedExceptions = MolgenisDataException.class, expectedExceptionsMessageRegExp = "Failed to read VCF Metadata from file; nested exception is java.io.IOException: error processing source")
public void testGetEntityType() throws IOException {
VcfReaderFactory vcfReaderFactory = mock(VcfReaderFactory.class);
VcfReader vcfReader = mock(VcfReader.class);
doThrow(new IOException("error processing source")).when(vcfReader).getVcfMeta();
when(vcfReaderFactory.get()).thenReturn(vcfReader);
String entityTypeId = "entityTypeId";
VcfAttributes vcfAttributes = mock(VcfAttributes.class);
EntityTypeFactory entityTypeFactory = mock(EntityTypeFactory.class);
AttributeFactory attrMetaFactory = mock(AttributeFactory.class);
VcfRepository vcfRepository = new VcfRepository(vcfReaderFactory, entityTypeId, vcfAttributes, entityTypeFactory, attrMetaFactory);
vcfRepository.getEntityType();
}
Aggregations