mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-13 02:59:39 +02:00
Throw exception if stanza child contains text
This commit is contained in:
parent
5a47f56cd0
commit
eb9242768c
2 changed files with 8 additions and 2 deletions
|
@ -710,8 +710,8 @@ public class PacketParserUtilsTest {
|
|||
try {
|
||||
PacketParserUtils.parseMessage(PacketParserUtils.getParserFor(invalidControl));
|
||||
fail("Exception should be thrown");
|
||||
} catch(XmlPullParserException e) {
|
||||
assertTrue(e.getMessage().contains("end tag name </body>"));
|
||||
} catch(IllegalStateException e) {
|
||||
assertTrue(e.getMessage().contains("Invalid Stanza"));
|
||||
}
|
||||
|
||||
invalidControl = validControl.replace("Good Message Body", "Bad </message> Body");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue