use of org.jivesoftware.smackx.usertune.element.UserTuneElement in project Smack by igniterealtime.
the class UserTuneElementTest method toXmlTest.
@Test
public void toXmlTest() throws IOException, XmlPullParserException, SmackParsingException, URISyntaxException {
URI uri = new URI("http://www.yesworld.com/lyrics/Fragile.html#9");
UserTuneElement.Builder builder = UserTuneElement.getBuilder();
UserTuneElement userTuneElement = builder.setArtist("Yes").setLength(686).setRating(8).setSource("Yessongs").setTitle("Heart of the Sunrise").setTrack("3").setUri(uri).build();
assertXmlSimilar(xml, userTuneElement.toXML().toString());
}
use of org.jivesoftware.smackx.usertune.element.UserTuneElement in project Smack by igniterealtime.
the class UserTuneElementTest method userTuneElementProviderTest.
@ParameterizedTest
@EnumSource(value = SmackTestUtil.XmlPullParserKind.class)
public void userTuneElementProviderTest(XmlPullParserKind parserKind) throws XmlPullParserException, IOException, SmackParsingException {
XmlPullParser parser = SmackTestUtil.getParserFor(xml, parserKind);
UserTuneElement parsed = UserTuneProvider.INSTANCE.parse(parser);
assertXmlSimilar(xml, parsed.toXML().toString());
}
Aggregations