Package org.geomajas.plugin.geocoder.command.dto

Examples of org.geomajas.plugin.geocoder.command.dto.GetLocationForStringResponse


    CommandResponse commandResponse = commandDispatcher.execute(GetLocationForStringRequest.COMMAND, request, null,
        "en");
    Assert.assertNotNull(commandResponse);
    Assert.assertTrue(commandResponse instanceof GetLocationForStringResponse);
    GetLocationForStringResponse response = (GetLocationForStringResponse) commandResponse;
    Assert.assertFalse(response.isLocationFound());
    Assert.assertNotNull(response.getAlternatives());
    Assert.assertTrue(response.getAlternatives().size() > 0);
    GetLocationForStringAlternative alt = response.getAlternatives().get(0);
    Assert.assertEquals(-0.12574, alt.getCenter().getX(), DELTA);
    Assert.assertEquals(51.50853, alt.getCenter().getY(), DELTA);
    Assert.assertEquals("GeoNames", alt.getGeocoderName());
  }
View Full Code Here


    CommandResponse commandResponse = commandDispatcher.execute(GetLocationForStringRequest.COMMAND, request, null,
        "en");
    Assert.assertNotNull(commandResponse);
    Assert.assertTrue(commandResponse instanceof GetLocationForStringResponse);
    GetLocationForStringResponse response = (GetLocationForStringResponse) commandResponse;
    Assert.assertFalse(response.isLocationFound());
    Assert.assertNotNull(response.getAlternatives());
    Assert.assertTrue(response.getAlternatives().size() > 0);
    GetLocationForStringAlternative alt = response.getAlternatives().get(0);
    Assert.assertEquals(-13997.312772346217, alt.getCenter().getX(), DELTA);
    Assert.assertEquals(6711744.580491004, alt.getCenter().getY(), DELTA);
    Assert.assertEquals("GeoNames", alt.getGeocoderName());
  }
View Full Code Here

    CommandResponse commandResponse = commandDispatcher.execute(GetLocationForStringRequest.COMMAND, request, null,
        "en");
    Assert.assertNotNull(commandResponse);
    Assert.assertTrue(commandResponse instanceof GetLocationForStringResponse);
    GetLocationForStringResponse response = (GetLocationForStringResponse) commandResponse;
    Assert.assertNotNull(response.getAlternatives());
    Assert.assertEquals(COUNT, response.getAlternatives().size());
  }
View Full Code Here

    CommandResponse commandResponse = commandDispatcher.execute(GetLocationForStringRequest.COMMAND, request, null,
        "en");
    Assert.assertNotNull(commandResponse);
    Assert.assertTrue(commandResponse instanceof GetLocationForStringResponse);
    GetLocationForStringResponse response = (GetLocationForStringResponse)commandResponse;
    Assert.assertTrue(response.isLocationFound());
    Assert.assertEquals("bla", response.getCanonicalLocation());
    Assert.assertNotNull(response.getCenter());
    Assert.assertNotNull(response.getBbox());
    Assert.assertEquals(30, response.getCenter().getX(), DELTA);
    Assert.assertEquals(50, response.getCenter().getY(), DELTA);
    Assert.assertNull(response.getGeocoderName()); // null when two results
    Assert.assertNull(response.getUserData()); // null when two results
  }
View Full Code Here

    CommandResponse commandResponse = commandDispatcher.execute(GetLocationForStringRequest.COMMAND, request, null,
        "en");
    Assert.assertNotNull(commandResponse);
    Assert.assertTrue(commandResponse instanceof GetLocationForStringResponse);
    GetLocationForStringResponse response = (GetLocationForStringResponse)commandResponse;
    Assert.assertTrue(response.isLocationFound());
    Assert.assertEquals("bla", response.getCanonicalLocation());
    Assert.assertNotNull(response.getCenter());
    Assert.assertNotNull(response.getBbox());
    Assert.assertEquals(30, response.getCenter().getX(), DELTA);
    Assert.assertEquals(50, response.getCenter().getY(), DELTA);
    Assert.assertNotNull(response.getUserData());
    Assert.assertEquals("alt1", response.getGeocoderName());
    Assert.assertEquals("alt1", ((UserDataTestInfo)response.getUserData()).getValue());
  }
View Full Code Here

    CommandResponse commandResponse = commandDispatcher.execute(GetLocationForStringRequest.COMMAND, request, null,
        "en");
    Assert.assertNotNull(commandResponse);
    Assert.assertTrue(commandResponse instanceof GetLocationForStringResponse);
    GetLocationForStringResponse response = (GetLocationForStringResponse)commandResponse;
    Assert.assertTrue(response.isLocationFound());
    Assert.assertEquals("bla", response.getCanonicalLocation());
    Assert.assertNotNull(response.getCenter());
    Assert.assertNotNull(response.getBbox());
    Assert.assertEquals(30, response.getCenter().getX(), DELTA);
    Assert.assertEquals(50, response.getCenter().getY(), DELTA);
    Assert.assertEquals("alt2", response.getGeocoderName());
    Assert.assertNotNull(response.getUserData());
    Assert.assertEquals("alt2", ((UserDataTestInfo)response.getUserData()).getValue());
  }
View Full Code Here

    CommandResponse commandResponse = commandDispatcher.execute(GetLocationForStringRequest.COMMAND, request, null,
        "en");
    Assert.assertNotNull(commandResponse);
    Assert.assertTrue(commandResponse instanceof GetLocationForStringResponse);
    GetLocationForStringResponse response = (GetLocationForStringResponse)commandResponse;
    Assert.assertTrue(response.isLocationFound());
    Assert.assertEquals("bla", response.getCanonicalLocation());
    Assert.assertNotNull(response.getCenter());
    Assert.assertNotNull(response.getBbox());
    Assert.assertEquals(30, response.getCenter().getX(), DELTA);
    Assert.assertEquals(50, response.getCenter().getY(), DELTA);
    Assert.assertNull(response.getGeocoderName());
    Assert.assertNull(response.getUserData());
  }
View Full Code Here

    CommandResponse commandResponse = commandDispatcher.execute(GetLocationForStringRequest.COMMAND, request, null,
        "en");
    Assert.assertNotNull(commandResponse);
    Assert.assertTrue(commandResponse instanceof GetLocationForStringResponse);
    GetLocationForStringResponse response = (GetLocationForStringResponse)commandResponse;
    Assert.assertFalse(response.isLocationFound());
    Assert.assertNull(response.getGeocoderName());
    Assert.assertNull(response.getUserData());
  }
View Full Code Here

    CommandResponse commandResponse = commandDispatcher.execute(GetLocationForStringRequest.COMMAND, request, null,
        "en");
    Assert.assertNotNull(commandResponse);
    Assert.assertTrue(commandResponse instanceof GetLocationForStringResponse);
    GetLocationForStringResponse response = (GetLocationForStringResponse)commandResponse;
    Assert.assertTrue(response.isLocationFound());
    Assert.assertEquals("one", response.getCanonicalLocation());
    Assert.assertNotNull(response.getCenter());
    Assert.assertNotNull(response.getBbox());
    Assert.assertEquals(50000, response.getCenter().getX(), DELTA);
    Assert.assertEquals(50000, response.getCenter().getY(), DELTA);
    Assert.assertEquals(0, response.getBbox().getX(), DELTA);
    Assert.assertEquals(0, response.getBbox().getY(), DELTA);
    Assert.assertEquals(100000, response.getBbox().getWidth(), DELTA);
    Assert.assertEquals(100000, response.getBbox().getHeight(), DELTA);
    Assert.assertEquals("static-regex", response.getGeocoderName());
  }
View Full Code Here

    CommandResponse commandResponse = commandDispatcher.execute(GetLocationForStringRequest.COMMAND, request, null,
        "en");
    Assert.assertNotNull(commandResponse);
    Assert.assertTrue(commandResponse instanceof GetLocationForStringResponse);
    GetLocationForStringResponse response = (GetLocationForStringResponse)commandResponse;
    Assert.assertTrue(response.isLocationFound());
    Assert.assertEquals("bla", response.getCanonicalLocation());
    Assert.assertNotNull(response.getCenter());
    Assert.assertNotNull(response.getBbox());
    Assert.assertEquals(87500, response.getCenter().getX(), DELTA);
    Assert.assertEquals(90000, response.getCenter().getY(), DELTA);
    Assert.assertEquals(75000, response.getBbox().getX(), DELTA);
    Assert.assertEquals(85000, response.getBbox().getY(), DELTA);
    Assert.assertEquals(25000, response.getBbox().getWidth(), DELTA);
    Assert.assertEquals(10000, response.getBbox().getHeight(), DELTA);
    Assert.assertNull(response.getGeocoderName());
  }
View Full Code Here

TOP

Related Classes of org.geomajas.plugin.geocoder.command.dto.GetLocationForStringResponse

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.