Created
March 13, 2015 05:46
-
-
Save droidchef/11d2f766913f9b468b53 to your computer and use it in GitHub Desktop.
GeoLocationProviderTest not able to get past it.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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