mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-27 06:22:07 +01:00
Remove unneeded empty string from stanza.toXML() invocation.
This commit is contained in:
parent
76dedf364b
commit
04e5f78411
1 changed files with 5 additions and 5 deletions
|
@ -87,7 +87,7 @@ public class PubSubIntegrationTest extends AbstractSmackIntegrationTest {
|
||||||
|
|
||||||
// Retrieve items and assert that the item that was just published is among them.
|
// Retrieve items and assert that the item that was just published is among them.
|
||||||
final List<Item> items = node.getItems();
|
final List<Item> items = node.getItems();
|
||||||
assertTrue( items.stream().anyMatch( stanza -> stanza.toXML( "" ).toString().contains( needle ) ) );
|
assertTrue( items.stream().anyMatch( stanza -> stanza.toXML().toString().contains( needle ) ) );
|
||||||
}
|
}
|
||||||
finally {
|
finally {
|
||||||
pubSubManagerOne.deleteNode( nodename );
|
pubSubManagerOne.deleteNode( nodename );
|
||||||
|
@ -824,7 +824,7 @@ public class PubSubIntegrationTest extends AbstractSmackIntegrationTest {
|
||||||
subscriberNode.subscribe( subscriber );
|
subscriberNode.subscribe( subscriber );
|
||||||
|
|
||||||
final CompletableFuture<Stanza> result = new CompletableFuture<>();
|
final CompletableFuture<Stanza> result = new CompletableFuture<>();
|
||||||
conTwo.addAsyncStanzaListener( result::complete, stanza -> stanza.toXML( "" ).toString().contains( needle ) );
|
conTwo.addAsyncStanzaListener( result::complete, stanza -> stanza.toXML().toString().contains( needle ) );
|
||||||
|
|
||||||
publisherNode.publish( new PayloadItem<>( GeoLocation.builder().setDescription( needle ).build() ) );
|
publisherNode.publish( new PayloadItem<>( GeoLocation.builder().setDescription( needle ).build() ) );
|
||||||
|
|
||||||
|
@ -977,7 +977,7 @@ public class PubSubIntegrationTest extends AbstractSmackIntegrationTest {
|
||||||
final EntityBareJid subscriber = conTwo.getUser().asEntityBareJid();
|
final EntityBareJid subscriber = conTwo.getUser().asEntityBareJid();
|
||||||
subscriberNode.subscribe(subscriber);
|
subscriberNode.subscribe(subscriber);
|
||||||
final CompletableFuture<Stanza> result = new CompletableFuture<>();
|
final CompletableFuture<Stanza> result = new CompletableFuture<>();
|
||||||
conTwo.addAsyncStanzaListener(result::complete, stanza -> stanza.toXML("").toString().contains(needle));
|
conTwo.addAsyncStanzaListener(result::complete, stanza -> stanza.toXML().toString().contains(needle));
|
||||||
|
|
||||||
// Delete an existent node
|
// Delete an existent node
|
||||||
pubSubManagerOne.deleteNode(nodename);
|
pubSubManagerOne.deleteNode(nodename);
|
||||||
|
@ -1029,8 +1029,8 @@ public class PubSubIntegrationTest extends AbstractSmackIntegrationTest {
|
||||||
assertEquals(1, items.size());
|
assertEquals(1, items.size());
|
||||||
final Item item = items.iterator().next();
|
final Item item = items.iterator().next();
|
||||||
assertEquals(itemId, item.getId());
|
assertEquals(itemId, item.getId());
|
||||||
assertFalse(item.toXML("").toString().contains(needleA));
|
assertFalse(item.toXML().toString().contains(needleA));
|
||||||
assertTrue(item.toXML("").toString().contains(needleB));
|
assertTrue(item.toXML().toString().contains(needleB));
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue