@Test public final void testInvalidLocationType() { final RawLocationReference mockedLocRef = new RawInvalidLocRef("id", null, LocationType.UNKNOWN); try { OpenLRDecoder decoder = new OpenLRDecoder(); OpenLRDecoderParameter parameter = new OpenLRDecoderParameter.Builder() .with(mockedMapDB) .with(td.getProperties()).buildParameter(); Location result = decoder.decodeRaw(parameter, mockedLocRef); assertFalse(result.isValid()); assertEquals(result.getReturnCode(), DecoderReturnCode.INVALID_LOCATION_TYPE); assertNull(result.getAccessPoint()); assertNull(result.getPointLocation()); assertNull(result.getPoiLine()); assertNull(result.getOrientation()); assertNull(result.getSideOfRoad()); assertTrue(result.getLocationLines().isEmpty()); assertFalse(result.hasNegativeOffset()); assertFalse(result.hasPositiveOffset()); CommonObjectTestUtils.testToString(result); } catch (OpenLRProcessingException e) { fail("Unexpected exception!", e); } }
@Override public List<Location> decodeRaw(final OpenLRDecoderParameter parameter, final List<RawLocationReference> locRefs) throws OpenLRProcessingException { List<Location> locations = new ArrayList<Location>(); OpenLRDecoderProperties properties = new OpenLRDecoderProperties(parameter.getConfiguration()); for (RawLocationReference locRef : locRefs) { locations.add(decodeRaw(parameter, properties, locRef)); } return locations; }
OpenLRDecoder implements openlr.OpenLRDecoder { @Override public List<Location> decodeRaw(final OpenLRDecoderParameter parameter, final List<RawLocationReference> locRefs) throws OpenLRProcessingException { List<Location> locations = new ArrayList<Location>(); OpenLRDecoderProperties properties = new OpenLRDecoderProperties(parameter.getConfiguration()); for (RawLocationReference locRef : locRefs) { locations.add(decodeRaw(parameter, properties, locRef)); } return locations; } }
OpenLRDecoder implements openlr.OpenLRDecoder { @Override public List<Location> decodeRaw(final OpenLRDecoderParameter parameter, final List<RawLocationReference> locRefs) throws OpenLRProcessingException { List<Location> locations = new ArrayList<Location>(); OpenLRDecoderProperties properties = new OpenLRDecoderProperties(parameter.getConfiguration()); for (RawLocationReference locRef : locRefs) { locations.add(decodeRaw(parameter, properties, locRef)); } return locations; }  }
OpenLRDecoder implements openlr.OpenLRDecoder { @Override public List<Location> decodeRaw(final OpenLRDecoderParameter parameter, final List<RawLocationReference> locRefs) throws OpenLRProcessingException { List<Location> locations = new ArrayList<Location>(); OpenLRDecoderProperties properties = new OpenLRDecoderProperties(parameter.getConfiguration()); for (RawLocationReference locRef : locRefs) { locations.add(decodeRaw(parameter, properties, locRef)); } return locations; }  static List<PhysicalDecoder> resolvePhysicalDecoder(); @Override Location decode(final OpenLRDecoderParameter parameter,
                           final LocationReference locRef); @Override List<Location> decode(final OpenLRDecoderParameter parameter,
                                 final List<LocationReference> locRefs); @Override List<Location> decodeRaw(final OpenLRDecoderParameter parameter,
                                    final List<RawLocationReference> locRefs); @Override Location decodeRaw(final OpenLRDecoderParameter parameter,
                              final RawLocationReference rawLocRef); @Override String getMajorVersion(); @Override String getMinorVersion(); @Override String getPatchVersion(); @Override String getVersion(); }
OpenLRDecoder implements openlr.OpenLRDecoder { @Override public List<Location> decodeRaw(final OpenLRDecoderParameter parameter, final List<RawLocationReference> locRefs) throws OpenLRProcessingException { List<Location> locations = new ArrayList<Location>(); OpenLRDecoderProperties properties = new OpenLRDecoderProperties(parameter.getConfiguration()); for (RawLocationReference locRef : locRefs) { locations.add(decodeRaw(parameter, properties, locRef)); } return locations; }  static List<PhysicalDecoder> resolvePhysicalDecoder(); @Override Location decode(final OpenLRDecoderParameter parameter,
                           final LocationReference locRef); @Override List<Location> decode(final OpenLRDecoderParameter parameter,
                                 final List<LocationReference> locRefs); @Override List<Location> decodeRaw(final OpenLRDecoderParameter parameter,
                                    final List<RawLocationReference> locRefs); @Override Location decodeRaw(final OpenLRDecoderParameter parameter,
                              final RawLocationReference rawLocRef); @Override String getMajorVersion(); @Override String getMinorVersion(); @Override String getPatchVersion(); @Override String getVersion();  }