Search in sources :

Example 6 with SoftwareInfoForm

use of org.jivesoftware.smackx.softwareinfo.form.SoftwareInfoForm in project Smack by igniterealtime.

the class SoftwareInfoFormTest method getInfoFromSoftwareInfoFormTest.

@Test
public void getInfoFromSoftwareInfoFormTest() throws URISyntaxException {
    SoftwareInfoForm softwareInfoForm = createSoftwareInfoForm();
    assertEquals("Windows", softwareInfoForm.getOS());
    assertEquals("XP", softwareInfoForm.getOSVersion());
    assertEquals("Exodus", softwareInfoForm.getSoftwareName());
    assertEquals("0.9.1", softwareInfoForm.getSoftwareVersion());
    assertXmlSimilar(createMediaElement().toXML(), softwareInfoForm.getIcon().toXML());
}
Also used : SoftwareInfoForm(org.jivesoftware.smackx.softwareinfo.form.SoftwareInfoForm) Test(org.junit.jupiter.api.Test)

Example 7 with SoftwareInfoForm

use of org.jivesoftware.smackx.softwareinfo.form.SoftwareInfoForm in project Smack by igniterealtime.

the class SoftwareInfoFormTest method softwareInfoBuilderTest.

@Test
public void softwareInfoBuilderTest() throws URISyntaxException {
    SoftwareInfoForm softwareInfoForm = createSoftwareInfoForm();
    assertXmlSimilar(xml, softwareInfoForm.getDataForm().toXML());
    softwareInfoForm = createSoftwareInfoFormUsingDataForm();
    assertXmlSimilar(xml, softwareInfoForm.getDataForm().toXML());
}
Also used : SoftwareInfoForm(org.jivesoftware.smackx.softwareinfo.form.SoftwareInfoForm) Test(org.junit.jupiter.api.Test)

Aggregations

SoftwareInfoForm (org.jivesoftware.smackx.softwareinfo.form.SoftwareInfoForm)7 MediaElement (org.jivesoftware.smackx.mediaelement.element.MediaElement)2 DataForm (org.jivesoftware.smackx.xdata.packet.DataForm)2 Test (org.junit.jupiter.api.Test)2 IOException (java.io.IOException)1 URI (java.net.URI)1 URISyntaxException (java.net.URISyntaxException)1 AbstractSmackIntegrationTest (org.igniterealtime.smack.inttest.AbstractSmackIntegrationTest)1 SmackIntegrationTest (org.igniterealtime.smack.inttest.annotations.SmackIntegrationTest)1 SmackParsingException (org.jivesoftware.smack.parsing.SmackParsingException)1 ThrowingRunnable (org.jivesoftware.smack.util.Async.ThrowingRunnable)1 XmlPullParserException (org.jivesoftware.smack.xml.XmlPullParserException)1 TextSingleFormField (org.jivesoftware.smackx.xdata.TextSingleFormField)1