mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-10 10:49:41 +02:00
Introduce XmlEnvironment
This commit is contained in:
parent
dc780ffd6c
commit
fee3ed81ca
229 changed files with 715 additions and 526 deletions
|
@ -76,7 +76,7 @@ public class OmemoBundleVAxolotlElementTest extends SmackTestSuite {
|
|||
"</preKeyPublic>" +
|
||||
"</prekeys>" +
|
||||
"</bundle>";
|
||||
String actual = bundle.toXML(null).toString();
|
||||
String actual = bundle.toXML().toString();
|
||||
assertEquals("Bundles XML must match.", expected, actual);
|
||||
|
||||
byte[] signedPreKey = "SignedPreKey".getBytes(StringUtils.UTF8);
|
||||
|
|
|
@ -42,7 +42,7 @@ public class OmemoDeviceListVAxolotlElementTest extends SmackTestSuite {
|
|||
ids.add(9876);
|
||||
|
||||
OmemoDeviceListElement_VAxolotl element = new OmemoDeviceListElement_VAxolotl(ids);
|
||||
String xml = element.toXML(null).toString();
|
||||
String xml = element.toXML().toString();
|
||||
|
||||
XmlPullParser parser = TestUtils.getParser(xml);
|
||||
OmemoDeviceListElement_VAxolotl parsed = new OmemoDeviceListVAxolotlProvider().parse(parser);
|
||||
|
|
|
@ -66,12 +66,12 @@ public class OmemoVAxolotlElementTest extends SmackTestSuite {
|
|||
"</payload>" +
|
||||
"</encrypted>";
|
||||
|
||||
String actual = element.toXML(null).toString();
|
||||
String actual = element.toXML().toString();
|
||||
assertEquals("Serialized xml of OmemoElement must match.", expected, actual);
|
||||
|
||||
OmemoElement_VAxolotl parsed = new OmemoVAxolotlProvider().parse(TestUtils.getParser(actual));
|
||||
assertEquals("Parsed OmemoElement must equal the original.",
|
||||
element.toXML(null).toString(),
|
||||
parsed.toXML(null).toString());
|
||||
element.toXML().toString(),
|
||||
parsed.toXML().toString());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue