use of eu.europa.ec.fisheries.ers.fa.entities.AapProcessEntity in project UVMS-ActivityModule-APP by UnionVMS.
the class AapProcessMapperTest method testAapProcessMapper.
@Test
public void testAapProcessMapper() {
AAPProcess aapProcess = MapperUtil.getAapProcess();
AapProcessEntity aapProcessEntity = AapProcessMapper.INSTANCE.mapToAapProcessEntity(aapProcess);
AapProcessCodeEntity entity = aapProcessEntity.getAapProcessCode().iterator().next();
assertEquals(aapProcess.getTypeCodes().get(0).getValue(), entity.getTypeCode());
assertEquals(aapProcess.getTypeCodes().get(0).getListID(), entity.getTypeCodeListId());
assertEquals(aapProcess.getConversionFactorNumeric().getValue().intValue(), aapProcessEntity.getConversionFactor().intValue());
assertNull(aapProcessEntity.getFaCatch());
assertNotNull(aapProcessEntity.getAapProducts());
AapProductEntity aapProductEntity = aapProcessEntity.getAapProducts().iterator().next();
assertNotNull(aapProductEntity);
aapProductEntity.getAapProcess().getAapProcessCode().iterator().next();
assertEquals(aapProcess.getTypeCodes().get(0).getValue(), entity.getTypeCode());
}
Aggregations