Skip to content

Instantly share code, notes, and snippets.

@droidchef
Created March 13, 2015 05:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save droidchef/11d2f766913f9b468b53 to your computer and use it in GitHub Desktop.
Save droidchef/11d2f766913f9b468b53 to your computer and use it in GitHub Desktop.
GeoLocationProviderTest not able to get past it.
public class GeoLocationProviderTest extends InitExtensions{
@Test
public void testGeoLocationProvider() throws Exception{
// @formatter:off
final String geoLocationString =
"<iq type='get' id='publish1'>"
+ "<pubsub xmlns='http://jabber.org/protocol/pubsub'>"
+ "<publish node='http://jabber.org/protocol/geoloc'>"
+ "<item>"
+ "<geoloc xmlns='http://jabber.org/protocol/geoloc' xml:lang='en'>"
+ "<accuracy>20</accuracy>"
+ "<country>Italy</country>"
+ "<lat>45.44</lat>"
+ "<locality>Venice</locality>"
+ "<lon>12.33</lon>"
+ "</geoloc>"
+ "</item>"
+ "</publish>"
+ "</pubsub>"
+ "</iq>";
// @formatter:on
IQ iqWithGeoLocation = (IQ) PacketParserUtils.parseStanza(geoLocationString);
assertNotNull(iqWithGeoLocation);
GeoLocation geoLocation = (GeoLocation) iqWithGeoLocation.getExtension(GeoLocation.ELEMENT, GeoLocation.NAMESPACE);
assertNotNull(geoLocation);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment