// Do not include certain default namespace on the root-element ('stream') or stanza level. This makes stanzas re-usable between, for example, c2s and s2s.
// Do not include certain default namespace on the root-element ('stream') or stanza level. This makes stanzas re-usable between, for example, c2s and s2s.
@@ -55,7 +55,9 @@ public class XMPPPacketReaderTest
finalStringinput="<stream:stream to='example.com' xmlns='jabber:client' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'><message from='juliet@example.com' to='romeo@example.net' xml:lang='en'><body>Art thou not Romeo, and a Montague?</body></message></stream:stream>";
@@ -76,7 +78,9 @@ public class XMPPPacketReaderTest
finalStringinput="<stream:stream to='example.com' xmlns:stream='http://etherx.jabber.org/streams' version='1.0'><message xmlns='jabber:client' from='juliet@example.com' to='romeo@example.net' xml:lang='en'><body>Art thou not Romeo, and a Montague?</body></message></stream:stream>";
Assert.assertFalse("'jabber:client' should not occur before 'something:else'",result.asXML().substring(0,result.asXML().indexOf("something:else")).contains("jabber:client"));
...
...
@@ -135,7 +141,31 @@ public class XMPPPacketReaderTest
Assert.assertFalse("'jabber:client' should not occur before 'something:else'",result.asXML().substring(0,result.asXML().indexOf("something:else")).contains("jabber:client"));
Assert.assertTrue("'jabber:client' should occur after 'something:else'",result.asXML().substring(result.asXML().indexOf("something:else")).contains("jabber:client"));
}
/**
* Check that a websocket connection woudl also work.
Assert.assertFalse("'jabber:client' should not occur before 'something:else'",result.asXML().substring(0,result.asXML().indexOf("something:else")).contains("jabber:client"));