use of un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FishingActivity 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());
}
use of un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FishingActivity in project UVMS-ActivityModule-APP by UnionVMS.
the class MapperUtil method getFaReportDocument.
public static FAReportDocument getFaReportDocument() {
CodeType typeCode = getCodeType("DECLARATION", "FLUX_FA_REPORT_TYPE");
CodeType fmcMarkerCode = getCodeType("Fmz marker 1", "h49rh-fhrus33-fj84hjs82-4h84hw82");
List<IDType> relatedReportIDs = Arrays.asList(getIdType("ID 1", "47rfh-5hry4-thfur75-4hf743"));
DateTimeType acceptanceDateTime = getDateTimeType("2016-07-01 11:15:00");
FLUXReportDocument relatedFLUXReportDocument = getFluxReportDocument();
List<FishingActivity> specifiedFishingActivities = Arrays.asList(getFishingActivity());
VesselTransportMeans specifiedVesselTransportMeans = getVesselTransportMeans();
FAReportDocument faReportDocument = new FAReportDocument(typeCode, fmcMarkerCode, relatedReportIDs, acceptanceDateTime, relatedFLUXReportDocument, specifiedFishingActivities, specifiedVesselTransportMeans);
return faReportDocument;
}
Aggregations