use of eu.europa.ec.fisheries.ers.service.mapper.view.JointFishingOperationViewMapper in project UVMS-ActivityModule-APP by UnionVMS.
the class FishingActivityViewMapperTest method testActivityJointFishingOperationViewMapper.
@Test
@SneakyThrows
public void testActivityJointFishingOperationViewMapper() {
FishingActivity fishingActivity = getFishingActivity();
FishingActivityEntity fishingActivityEntity = FishingActivityMapper.INSTANCE.mapToFishingActivityEntity(fishingActivity, null, new FishingActivityEntity());
fishingActivityEntity.setTypeCode("JOINT_FISHING_OPERATION");
fishingActivityEntity.getAllRelatedFishingActivities().iterator().next().setTypeCode("RELOCATION");
JointFishingOperationViewMapper mapper = new JointFishingOperationViewMapper();
FishingActivityViewDTO dto = mapper.mapFaEntityToFaDto(fishingActivityEntity);
assertNotNull(dto);
assertNotNull(dto.getActivityDetails());
assertNotNull(dto.getCatches());
assertNotNull(dto.getGears());
assertNotNull(dto.getGearProblems());
assertNotNull(dto.getVesselDetails());
assertNotNull(dto.getRelocations());
assertNotNull(dto.getProcessingProducts());
assertNotNull(dto.getLocations());
}
Aggregations