mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-24 11:38:00 +01:00
Merge pull request #630 from guusdk/sint_formtest-smack-4.5.0-beta2
[sint] Fix compatibility with Smack 4.5.0-beta2
This commit is contained in:
commit
348a3ab091
1 changed files with 6 additions and 6 deletions
|
@ -128,22 +128,22 @@ public class FormTest extends AbstractSmackIntegrationTest {
|
|||
completedForm.setAnswer("time", true);
|
||||
completedForm.setAnswer("age", 20);
|
||||
// Create a new message to send with the completed form
|
||||
msg2 = StanzaBuilder.buildMessage()
|
||||
Message msg3 = StanzaBuilder.buildMessage()
|
||||
.to(conOne.getUser().asBareJid())
|
||||
.setThread(msg.getThread())
|
||||
.setThread(msg2.getThread())
|
||||
.ofType(Message.Type.chat)
|
||||
.setBody("To enter a case please fill out this form and send it back to me")
|
||||
// Add the completed form to the message
|
||||
.addExtension(completedForm.getDataFormToSubmit())
|
||||
.build();
|
||||
// Send the message with the completed form
|
||||
conTwo.sendStanza(msg2);
|
||||
conTwo.sendStanza(msg3);
|
||||
|
||||
// Get the message with the completed form
|
||||
Message msg3 = collector.nextResult();
|
||||
assertNotNull(msg3, "Message not found");
|
||||
Message msg4 = collector.nextResult();
|
||||
assertNotNull(msg4, "Message not found");
|
||||
// Retrieve the completed form
|
||||
final DataForm completedForm2 = DataForm.from(msg3);
|
||||
final DataForm completedForm2 = DataForm.from(msg4);
|
||||
assertNotNull(completedForm2);
|
||||
assertNotNull(completedForm2.getField("name"));
|
||||
assertNotNull(completedForm2.getField("description"));
|
||||
|
|
Loading…
Reference in a new issue