mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-27 06:22:07 +01:00
Additional Pubsub integration tests
Test for XEP-0060 § 8.4.3.2: Asserts that the server returns an 'item-not-found' error response when deleting a node that does not exist.
This commit is contained in:
parent
f4d24cf2cf
commit
8bec182d2a
1 changed files with 23 additions and 1 deletions
|
@ -922,5 +922,27 @@ public class PubSubIntegrationTest extends AbstractSmackIntegrationTest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Asserts that the server returns an 'item-not-found' error response when
|
||||||
|
* deleting a node that does not exist.
|
||||||
|
*
|
||||||
|
* <p>
|
||||||
|
* From XEP-0060 § 8.4.3.2:
|
||||||
|
* </p>
|
||||||
|
* <blockquote> If the requesting entity attempts to delete a node that does not
|
||||||
|
* exist, the service MUST return an <item-not-found/> error.
|
||||||
|
* </blockquote>
|
||||||
|
*
|
||||||
|
* @throws NoResponseException if there was no response from the remote
|
||||||
|
* entity.
|
||||||
|
* @throws XMPPErrorException if there was an XMPP error returned.
|
||||||
|
* @throws NotConnectedException if the XMPP connection is not connected.
|
||||||
|
* @throws InterruptedException if the calling thread was interrupted.
|
||||||
|
*/
|
||||||
|
@SmackIntegrationTest
|
||||||
|
public void deleteNonExistentNodeTest() throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
|
||||||
|
final String nodename = "sinttest-delete-node-that-does-not-exist-" + testRunId;
|
||||||
|
// Delete an non existent node
|
||||||
|
assertFalse( pubSubManagerOne.deleteNode(nodename), "The server should have returned a <item-not-found/> error, but did not." );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue