use of eu.europa.ec.fisheries.ers.fa.entities.FluxReportIdentifierEntity in project UVMS-ActivityModule-APP by UnionVMS.
the class ActivityMatchingIdsServiceBeanTest method getMockedIdentifiers.
private List<FluxReportIdentifierEntity> getMockedIdentifiers() {
FluxReportIdentifierEntity ident1 = new FluxReportIdentifierEntity();
FluxReportIdentifierEntity ident2 = new FluxReportIdentifierEntity();
ident1.setFluxReportIdentifierId("46DCC44C-0AE2-434C-BC14-B85D86B29512iiiii");
ident1.setFluxReportIdentifierSchemeId("scheme-idvv");
ident1.setFluxReportIdentifierId("46DCC44C-0AE2-434C-BC14-B85D86B29512bbbbb");
ident1.setFluxReportIdentifierSchemeId("scheme-idqq");
return Arrays.asList(ident1, ident2);
}
use of eu.europa.ec.fisheries.ers.fa.entities.FluxReportIdentifierEntity in project UVMS-ActivityModule-APP by UnionVMS.
the class FaReportDocumentMapperTest method testMapToFaReportCorrection.
@Test
public void testMapToFaReportCorrection() {
FaReportDocumentEntity faReportDocumentEntity = MapperUtil.getFaReportDocumentEntity();
FaReportCorrectionDTO faReportCorrectionDTO = FaReportDocumentMapper.INSTANCE.mapToFaReportCorrectionDto(faReportDocumentEntity);
assertEquals(faReportDocumentEntity.getStatus(), faReportCorrectionDTO.getCorrectionType());
assertEquals(faReportDocumentEntity.getFluxReportDocument().getCreationDatetime(), faReportCorrectionDTO.getCreationDate());
FluxReportIdentifierEntity entity = faReportDocumentEntity.getFluxReportDocument().getFluxReportIdentifiers().iterator().next();
assertEquals(entity.getFluxReportIdentifierId(), faReportCorrectionDTO.getFaReportIdentifiers().entrySet().iterator().next().getKey());
assertEquals(entity.getFluxReportIdentifierSchemeId(), faReportCorrectionDTO.getFaReportIdentifiers().entrySet().iterator().next().getValue());
assertEquals(faReportDocumentEntity.getFluxReportDocument().getFluxParty().getFluxPartyName(), faReportCorrectionDTO.getOwnerFluxPartyName());
}
use of eu.europa.ec.fisheries.ers.fa.entities.FluxReportIdentifierEntity in project UVMS-ActivityModule-APP by UnionVMS.
the class FaReportDocumentMapperTest method testMapToFaReportCorrectionList.
@Test
public void testMapToFaReportCorrectionList() {
FaReportDocumentEntity faReportDocumentEntity = MapperUtil.getFaReportDocumentEntity();
List<FaReportCorrectionDTO> faReportCorrectionDTOs = FaReportDocumentMapper.INSTANCE.mapToFaReportCorrectionDtoList(Arrays.asList(faReportDocumentEntity));
FaReportCorrectionDTO faReportCorrectionDTO = faReportCorrectionDTOs.get(0);
assertEquals(faReportDocumentEntity.getStatus(), faReportCorrectionDTO.getCorrectionType());
assertEquals(faReportDocumentEntity.getFluxReportDocument().getCreationDatetime(), faReportCorrectionDTO.getCreationDate());
FluxReportIdentifierEntity entity = faReportDocumentEntity.getFluxReportDocument().getFluxReportIdentifiers().iterator().next();
assertEquals(entity.getFluxReportIdentifierId(), faReportCorrectionDTO.getFaReportIdentifiers().entrySet().iterator().next().getKey());
assertEquals(entity.getFluxReportIdentifierSchemeId(), faReportCorrectionDTO.getFaReportIdentifiers().entrySet().iterator().next().getValue());
assertEquals(faReportDocumentEntity.getFluxReportDocument().getFluxParty().getFluxPartyName(), faReportCorrectionDTO.getOwnerFluxPartyName());
}
use of eu.europa.ec.fisheries.ers.fa.entities.FluxReportIdentifierEntity in project UVMS-ActivityModule-APP by UnionVMS.
the class MapperUtil method getFluxReportDocumentEntity.
public static FluxReportDocumentEntity getFluxReportDocumentEntity() {
FluxReportDocumentEntity fluxReportDocumentEntity = new FluxReportDocumentEntity();
fluxReportDocumentEntity.setCreationDatetime(new Date());
fluxReportDocumentEntity.setFluxReportIdentifiers(new HashSet<FluxReportIdentifierEntity>(Arrays.asList(getFluxReportIdentifierEntity())));
fluxReportDocumentEntity.setFluxParty(getFluxPartyEntity());
fluxReportDocumentEntity.setPurpose("Test purpose");
fluxReportDocumentEntity.setPurposeCode("5");
fluxReportDocumentEntity.setPurposeCodeListId("57thf-58fj88-4d9834-thdue");
fluxReportDocumentEntity.setReferenceId("Ref Id 1");
return fluxReportDocumentEntity;
}
use of eu.europa.ec.fisheries.ers.fa.entities.FluxReportIdentifierEntity in project UVMS-ActivityModule-APP by UnionVMS.
the class MapperUtil method getFluxReportIdentifierEntity.
public static FluxReportIdentifierEntity getFluxReportIdentifierEntity() {
FluxReportIdentifierEntity fluxReportIdentifierEntity = new FluxReportIdentifierEntity();
fluxReportIdentifierEntity.setFluxReportIdentifierId("Report Id 1");
fluxReportIdentifierEntity.setFluxReportIdentifierSchemeId("Scheme Id 1");
return fluxReportIdentifierEntity;
}
Aggregations