use of un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.RegistrationEvent in project UVMS-ActivityModule-APP by UnionVMS.
the class RegistrationEventMapperTest method testRegistrationEventMapper.
@Test
public void testRegistrationEventMapper() {
RegistrationEvent registrationEvent = MapperUtil.getRegistrationEvent();
RegistrationEventEntity registrationEventEntity = RegistrationEventMapper.INSTANCE.mapToRegistrationEventEntity(registrationEvent);
assertTrue(registrationEventEntity.getDescription().startsWith(registrationEvent.getDescriptions().get(0).getValue()));
assertEquals(registrationEvent.getOccurrenceDateTime().getDateTime().toGregorianCalendar().getTime(), registrationEventEntity.getOccurrenceDatetime());
assertNotNull(registrationEventEntity.getRegistrationLocation());
registrationEventEntity = registrationEventEntity.getRegistrationLocation().getRegistrationEvent();
assertTrue(registrationEventEntity.getDescription().startsWith(registrationEvent.getDescriptions().get(0).getValue()));
assertEquals(registrationEvent.getOccurrenceDateTime().getDateTime().toGregorianCalendar().getTime(), registrationEventEntity.getOccurrenceDatetime());
}
use of un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.RegistrationEvent in project UVMS-ActivityModule-APP by UnionVMS.
the class MapperUtil method getVesselTransportMeans.
public static VesselTransportMeans getVesselTransportMeans() {
VesselTransportMeans vesselTransportMeans = new VesselTransportMeans();
CodeType roleCode = getCodeType("CATCHING_VESSEL", "FA_VESSEL_ROLE");
List<TextType> names = Arrays.asList(getTextType("Test Name"));
List<FLAPDocument> grantedFLAPDocuments = Arrays.asList(getFlapDocument());
List<IDType> ids = Arrays.asList(getIdType("ID 1", "CFR"));
List<ContactParty> specifiedContactParties = Arrays.asList(getContactParty());
List<RegistrationEvent> specifiedRegistrationEvents = Arrays.asList(getRegistrationEvent());
VesselCountry vesselCounty = new VesselCountry(getIdType("Country Id 1", "tu587r-5jt85-tjfur7-tjgut7"));
vesselTransportMeans.setRoleCode(roleCode);
vesselTransportMeans.setNames(names);
vesselTransportMeans.setGrantedFLAPDocuments(grantedFLAPDocuments);
vesselTransportMeans.setIDS(ids);
vesselTransportMeans.setSpecifiedContactParties(specifiedContactParties);
vesselTransportMeans.setSpecifiedRegistrationEvents(specifiedRegistrationEvents);
vesselTransportMeans.setRegistrationVesselCountry(vesselCounty);
return vesselTransportMeans;
}
Aggregations