use of eu.europa.ec.fisheries.ers.service.dto.view.FluxLocationDto in project UVMS-ActivityModule-APP by UnionVMS.
the class BaseMapperTest method testMapFluxLocations.
@Test
@SneakyThrows
public void testMapFluxLocations() {
FluxLocationEntity entity1 = new FluxLocationEntity();
entity1.setTypeCode("LOCATION");
entity1.setRfmoCode("RFMO1");
FluxLocationEntity entity2 = new FluxLocationEntity();
entity2.setTypeCode("DUMMY");
entity2.setRfmoCode("RFMO2");
Set<FluxLocationDto> fluxLocationDtos = BaseMapper.mapFromFluxLocation(newSet(entity1, entity2), FluxLocationEnum.LOCATION);
assertEquals(1, fluxLocationDtos.size());
assertEquals("RFMO1", fluxLocationDtos.iterator().next().getRfmoCode());
}
use of eu.europa.ec.fisheries.ers.service.dto.view.FluxLocationDto in project UVMS-ActivityModule-APP by UnionVMS.
the class BaseMapperTest method testMapFromFluxLocation.
@Test
public void testMapFromFluxLocation() {
FluxLocationEntity locationEntity_1 = FluxLocationEntity.builder().fluxLocationIdentifier("id1").fluxLocationIdentifierSchemeId("scheme1").build();
FluxLocationEntity locationEntity_2 = FluxLocationEntity.builder().fluxLocationIdentifier("id1").fluxLocationIdentifierSchemeId("scheme1").build();
HashSet<FluxLocationEntity> fluxLocationEntities = Sets.newHashSet(locationEntity_1, locationEntity_2);
assertEquals(1, fluxLocationEntities.size());
Set<FluxLocationDto> fluxLocationDtos = BaseMapper.mapFromFluxLocation(fluxLocationEntities);
assertEquals(1, fluxLocationDtos.size());
}
use of eu.europa.ec.fisheries.ers.service.dto.view.FluxLocationDto in project UVMS-ActivityModule-APP by UnionVMS.
the class FluxLocationMapperTest method mapToFluxLocationDTOTest.
@Test
public void mapToFluxLocationDTOTest() {
FluxLocationEntity fluxLocationEntity = getFluxLocationEntityMock();
FluxLocationDto locationDto = FluxLocationMapper.INSTANCE.mapEntityToFluxLocationDto(fluxLocationEntity);
assertNotNull(locationDto);
}
Aggregations