Search in sources :

Example 16 with FluxLocationEntity

use of eu.europa.ec.fisheries.ers.fa.entities.FluxLocationEntity in project UVMS-ActivityModule-APP by UnionVMS.

the class BaseActivityViewMapperTest method testGetAreas.

@Test
public void testGetAreas() {
    FishingActivityEntity entity = new FishingActivityEntity();
    FluxLocationEntity fluxLocationEntity = new FluxLocationEntity();
    fluxLocationEntity.setFluxLocationIdentifier("id");
    fluxLocationEntity.setFluxLocationIdentifierSchemeId("schemeId");
    fluxLocationEntity.setTypeCode("AREA");
    entity.setFluxLocations(Collections.set(fluxLocationEntity));
    AreaDto areas = BaseActivityViewMapper.getAreas(entity);
    Map<String, String> stringMap = new HashMap<>();
    stringMap.put("id", "id");
    stringMap.put("schemeId", "schemeId");
    assertEquals(stringMap, areas.getIdentifiers());
}
Also used : HashMap(java.util.HashMap) AreaDto(eu.europa.ec.fisheries.ers.service.dto.view.AreaDto) FluxLocationEntity(eu.europa.ec.fisheries.ers.fa.entities.FluxLocationEntity) FishingActivityEntity(eu.europa.ec.fisheries.ers.fa.entities.FishingActivityEntity) Test(org.junit.Test)

Aggregations

FluxLocationEntity (eu.europa.ec.fisheries.ers.fa.entities.FluxLocationEntity)16 Test (org.junit.Test)7 HashSet (java.util.HashSet)5 FLUXLocation (un.unece.uncefact.data.standard.reusableaggregatebusinessinformationentity._20.FLUXLocation)5 FluxLocationDto (eu.europa.ec.fisheries.ers.service.dto.view.FluxLocationDto)4 FishingActivityEntity (eu.europa.ec.fisheries.ers.fa.entities.FishingActivityEntity)3 ArrayList (java.util.ArrayList)3 FaCatchEntity (eu.europa.ec.fisheries.ers.fa.entities.FaCatchEntity)2 FishingGearEntity (eu.europa.ec.fisheries.ers.fa.entities.FishingGearEntity)2 FishingTripEntity (eu.europa.ec.fisheries.ers.fa.entities.FishingTripEntity)2 FluxCharacteristicEntity (eu.europa.ec.fisheries.ers.fa.entities.FluxCharacteristicEntity)2 BaseUnitilsTest (eu.europa.ec.fisheries.uvms.BaseUnitilsTest)2 Geometry (com.vividsolutions.jts.geom.Geometry)1 AapProcessEntity (eu.europa.ec.fisheries.ers.fa.entities.AapProcessEntity)1 AapStockEntity (eu.europa.ec.fisheries.ers.fa.entities.AapStockEntity)1 DelimitedPeriodEntity (eu.europa.ec.fisheries.ers.fa.entities.DelimitedPeriodEntity)1 FishingActivityIdentifierEntity (eu.europa.ec.fisheries.ers.fa.entities.FishingActivityIdentifierEntity)1 StructuredAddressEntity (eu.europa.ec.fisheries.ers.fa.entities.StructuredAddressEntity)1 FluxLocationCatchTypeEnum (eu.europa.ec.fisheries.ers.fa.utils.FluxLocationCatchTypeEnum)1 DestinationLocationDto (eu.europa.ec.fisheries.ers.service.dto.facatch.DestinationLocationDto)1