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

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


  @Before
  public void disableWidgets() {
    GWTMockUtilities.disarm();

    matchedResponse = new GetLocationForStringResponse();
    matchedResponse.setLocationFound(true);

    alternativesResponse = new GetLocationForStringResponse();
    List<GetLocationForStringAlternative> list = new ArrayList<GetLocationForStringAlternative>();
    list.add(new GetLocationForStringAlternative());
    list.add(new GetLocationForStringAlternative());
    alternativesResponse.setAlternatives(list);
  }
View Full Code Here


  @Autowired
  private GeoService geoService;

  /** {@inheritDoc} */
  public GetLocationForStringResponse getEmptyCommandResponse() {
    return new GetLocationForStringResponse();
  }
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("booischot", response.getCanonicalLocation());
    Assert.assertNotNull(response.getCenter());
    Assert.assertNotNull(response.getBbox());
    Assert.assertEquals(621468.063486916, response.getCenter().getX(), DELTA);
    Assert.assertEquals(5706881.117852388, response.getCenter().getY(), DELTA);
    Assert.assertEquals(621325.5343735645, response.getBbox().getX(), DELTA);
    Assert.assertEquals(5706809.617868648, response.getBbox().getY(), DELTA);
    Assert.assertEquals(285.05822670296766, response.getBbox().getWidth(), DELTA);
    Assert.assertEquals(142.99996748007834, response.getBbox().getHeight(), DELTA);
    Assert.assertEquals("static-regex", response.getGeocoderName());
    Assert.assertNotNull(response.getUserData());
    Assert.assertEquals("schotbooi", ((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("Booischot", response.getCanonicalLocation());
    Assert.assertNotNull(response.getCenter());
    Assert.assertNotNull(response.getBbox());
    Assert.assertEquals(5.582742600224577, response.getCenter().getX(), DELTA);
    Assert.assertEquals(45.53964302945367, response.getCenter().getY(), DELTA);
  }
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("secondService", response.getCanonicalLocation());
    Assert.assertNotNull(response.getCenter());
    Assert.assertNotNull(response.getBbox());
    Assert.assertEquals(10000, response.getCenter().getX(), DELTA);
    Assert.assertEquals(10000, response.getCenter().getY(), DELTA);
    Assert.assertEquals("static-regex", 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("bbox", response.getCanonicalLocation());
    Assert.assertNotNull(response.getCenter());
    Assert.assertNotNull(response.getBbox());
    Assert.assertEquals(50000, response.getCenter().getX(), DELTA);
    Assert.assertEquals(90000, response.getCenter().getY(), DELTA);
    Assert.assertEquals(0, response.getBbox().getX(), DELTA);
    Assert.assertEquals(50000, response.getBbox().getY(), DELTA);
    Assert.assertEquals(100000, response.getBbox().getWidth(), DELTA);
    Assert.assertEquals(80000, response.getBbox().getHeight(), DELTA);
    Assert.assertEquals("static-regex", 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("bla", response.getCanonicalLocation());
    Assert.assertNotNull(response.getCenter());
    Assert.assertNotNull(response.getBbox());
    Assert.assertEquals(57500, response.getCenter().getX(), DELTA);
    Assert.assertEquals(72500, response.getCenter().getY(), DELTA);
    Assert.assertEquals(30000, response.getBbox().getX(), DELTA);
    Assert.assertEquals(50000, response.getBbox().getY(), DELTA);
    Assert.assertEquals(55000, response.getBbox().getWidth(), DELTA);
    Assert.assertEquals(45000, response.getBbox().getHeight(), DELTA);
    Assert.assertNull(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.assertFalse(response.isLocationFound());
    Assert.assertNull(response.getCanonicalLocation());
    Assert.assertNull(response.getGeocoderName());
  }
View Full Code Here

    CommandResponse commandResponse = commandDispatcher.execute(GetLocationForStringRequest.COMMAND, request, null,
        "en");
    // @extract-skip-start
    Assert.assertNotNull(commandResponse);
    Assert.assertTrue(commandResponse instanceof GetLocationForStringResponse);
    GetLocationForStringResponse response = (GetLocationForStringResponse) commandResponse;
    Assert.assertTrue(response.isLocationFound());
    Assert.assertEquals("Booischot, BE", response.getCanonicalLocation());
    Assert.assertNotNull(response.getCenter());
    Assert.assertNotNull(response.getBbox());
    Assert.assertEquals(4.7751, response.getCenter().getX(), DELTA);
    Assert.assertEquals(51.05219, response.getCenter().getY(), DELTA);
    Assert.assertNull(response.getAlternatives());
    Assert.assertEquals("GeoNames", response.getGeocoderName());
    // @extract-skip-end
  }
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("Booischot, BE", response.getCanonicalLocation());
    Assert.assertNotNull(response.getCenter());
    Assert.assertNotNull(response.getBbox());
    Assert.assertEquals(531561.7004869606, response.getCenter().getX(), DELTA);
    Assert.assertEquals(6630530.727245597, response.getCenter().getY(), DELTA);
    Assert.assertNull(response.getAlternatives());
    Assert.assertEquals("GeoNames", 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.