Author: mjakl
Date: Sat Jun 27 19:27:49 2009
New Revision: 789010
URL: http://svn.apache.org/viewvc?rev=789010&view=rev
Log:
Fixed documentation of the test for pubsub related disco#info.
Modified:
mina/sandbox/vysper/trunk/src/test/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/PubSubDiscoInfoTestCase.java
Modified:
mina/sandbox/vysper/trunk/src/test/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/PubSubDiscoInfoTestCase.java
URL:
http://svn.apache.org/viewvc/mina/sandbox/vysper/trunk/src/test/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/PubSubDiscoInfoTestCase.java?rev=789010&r1=789009&r2=789010&view=diff
==============================================================================
---
mina/sandbox/vysper/trunk/src/test/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/PubSubDiscoInfoTestCase.java
(original)
+++
mina/sandbox/vysper/trunk/src/test/java/org/apache/vysper/xmpp/modules/extension/xep0060_pubsub/PubSubDiscoInfoTestCase.java
Sat Jun 27 19:27:49 2009
@@ -40,13 +40,16 @@
assertEquals("id123", response.getAttributeValue("id")); // IDs must
match
- // get the subscription Element
+ // get the query Element
XMLElement query = response.getFirstInnerElement();
List<XMLElement> inner = query.getInnerElements();
assertEquals("query", query.getName());
+
+ // at least we have an identity and a feature element
assertTrue(inner.size() >= 2);
+ // ordering etc. is unknown; step through all subelements and pick the
ones we need
XMLElement identity = null;
XMLElement feature = null;
for(XMLElement el : inner) {
@@ -59,6 +62,8 @@
feature = el;
}
}
+
+ // make sure they were there (booleans would have sufficed)
assertNotNull(identity);
assertNotNull(feature);
}