1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-27 06:22:07 +01:00

Switch to use FillableSubscribeForm

This commit is contained in:
Guus der Kinderen 2020-05-15 12:07:50 +02:00 committed by Paul Schaub
parent b43a7b1987
commit 76dedf364b

View file

@ -437,9 +437,9 @@ public class PubSubIntegrationTest extends AbstractSmackIntegrationTest {
// Subscribe to the node twice, using different configuration
final Node subscriberNode = pubSubManagerTwo.getNode(nodename);
final EntityBareJid subscriber = conTwo.getUser().asEntityBareJid();
final FillableSubscribeForm formA = new FillableSubscribeForm( DataForm.builder( DataForm.Type.form ).build() );
final FillableSubscribeForm formA = subscriberNode.getSubscriptionOptions( subscriber.toString() ).getFillableForm();
formA.setDigestFrequency( 1 );
final FillableSubscribeForm formB = new FillableSubscribeForm( DataForm.builder( DataForm.Type.form ).build() );
final FillableSubscribeForm formB = subscriberNode.getSubscriptionOptions( subscriber.toString() ).getFillableForm();
formB.setDigestFrequency( 2 );
final Subscription subscriptionA = subscriberNode.subscribe( subscriber, formA );
@ -487,9 +487,9 @@ public class PubSubIntegrationTest extends AbstractSmackIntegrationTest {
// Subscribe to the node twice, using different configuration
final Node subscriberNode = pubSubManagerTwo.getNode(nodename);
final EntityBareJid subscriber = conTwo.getUser().asEntityBareJid();
final FillableSubscribeForm formA = new FillableSubscribeForm( DataForm.builder( DataForm.Type.form ).build() );
final FillableSubscribeForm formA = subscriberNode.getSubscriptionOptions( subscriber.toString() ).getFillableForm();
formA.setDigestFrequency( 1 );
final FillableSubscribeForm formB =new FillableSubscribeForm( DataForm.builder( DataForm.Type.form ).build() );
final FillableSubscribeForm formB = subscriberNode.getSubscriptionOptions( subscriber.toString() ).getFillableForm();
formB.setDigestFrequency( 2 );
final Subscription subscriptionA = subscriberNode.subscribe( subscriber, formA );
@ -577,9 +577,9 @@ public class PubSubIntegrationTest extends AbstractSmackIntegrationTest {
// Subscribe to the node twice, using different configuration
final Node subscriberNode = pubSubManagerTwo.getNode(nodename);
final EntityBareJid subscriber = conTwo.getUser().asEntityBareJid();
final FillableSubscribeForm formA = new FillableSubscribeForm( DataForm.builder( DataForm.Type.form ).build() );
final FillableSubscribeForm formA = subscriberNode.getSubscriptionOptions( subscriber.toString() ).getFillableForm();
formA.setDigestFrequency( 1 );
final FillableSubscribeForm formB = new FillableSubscribeForm( DataForm.builder( DataForm.Type.form ).build() );
final FillableSubscribeForm formB = subscriberNode.getSubscriptionOptions( subscriber.toString() ).getFillableForm();
formB.setDigestFrequency( 2 );
subscriberNode.subscribe( subscriber, formA );
@ -749,9 +749,9 @@ public class PubSubIntegrationTest extends AbstractSmackIntegrationTest {
// Subscribe to the node twice, using different configuration
final Node subscriberNode = pubSubManagerTwo.getNode(nodename);
final EntityBareJid subscriber = conTwo.getUser().asEntityBareJid();
final FillableSubscribeForm formA = new FillableSubscribeForm( DataForm.builder( DataForm.Type.form ).build() );
final FillableSubscribeForm formA = subscriberNode.getSubscriptionOptions( subscriber.toString() ).getFillableForm();
formA.setDigestFrequency( 1 );
final FillableSubscribeForm formB = new FillableSubscribeForm( DataForm.builder( DataForm.Type.form ).build() );
final FillableSubscribeForm formB = subscriberNode.getSubscriptionOptions( subscriber.toString() ).getFillableForm();
formB.setDigestFrequency( 2 );
subscriberNode.subscribe( subscriber, formA );