use of org.nextprot.api.etl.service.StatementExtractorService in project nextprot-api by calipho-sib.
the class StatementLoadAndRetrievedStatementsOnUnitDBTest method shouldExtractLoadAndRetriveStatements.
@Test
public void shouldExtractLoadAndRetriveStatements() {
StatementExtractorService extractor = new StatementsExtractorLocalMockImpl();
Set<Statement> rawStatements = extractor.getStatementsForSourceForGeneNameAndEnvironment(null, "2017-01-13", "msh6-variant-on-iso1-but-not-on-iso2");
statementETLService.setStatementExtractorService(extractor);
statementETLService.setStatementTransformerService(transformerMockedService);
Set<Statement> mappedStatements = ((StatementETLServiceImpl) statementETLService).transformStatements(rawStatements, new ReportBuilder());
((StatementETLServiceImpl) statementETLService).loadStatements(rawStatements, mappedStatements, true, new ReportBuilder());
List<Statement> dbStatements = statementDao.findNormalStatements(AnnotationType.ENTRY, "NX_P52701");
dbStatements.addAll(statementDao.findProteoformStatements(AnnotationType.ENTRY, "NX_P52701"));
Assert.assertEquals(dbStatements.size(), mappedStatements.size());
}
Aggregations