mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 17:49:38 +02:00
Make XMPPError imutable and add stanza reference
This commit is contained in:
parent
83eda4c58d
commit
45feaecdf7
30 changed files with 308 additions and 94 deletions
|
@ -62,7 +62,7 @@ public class IQResponseTest {
|
|||
*/
|
||||
@Test
|
||||
public void testGeneratingValidErrorResponse() throws XmppStringprepException {
|
||||
final XMPPError error = new XMPPError(XMPPError.Condition.bad_request);
|
||||
final XMPPError.Builder error = XMPPError.getBuilder(XMPPError.Condition.bad_request);
|
||||
final IQ request = new TestIQ(ELEMENT, NAMESPACE);
|
||||
|
||||
request.setType(IQ.Type.set);
|
||||
|
@ -75,7 +75,7 @@ public class IQResponseTest {
|
|||
assertNotNull(result.getStanzaId());
|
||||
assertEquals(request.getStanzaId(), result.getStanzaId());
|
||||
assertEquals(request.getFrom(), result.getTo());
|
||||
assertEquals(error, result.getError());
|
||||
assertEquals(error.build().toXML(), result.getError().toXML());
|
||||
// TODO this test was never valid
|
||||
// assertEquals(CHILD_ELEMENT, result.getChildElementXML());
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ public class IQResponseTest {
|
|||
*/
|
||||
@Test
|
||||
public void testGeneratingErrorBasedOnError() throws XmppStringprepException {
|
||||
final XMPPError error = new XMPPError(XMPPError.Condition.bad_request);
|
||||
final XMPPError.Builder error = XMPPError.getBuilder(XMPPError.Condition.bad_request);
|
||||
final IQ request = new TestIQ(ELEMENT, NAMESPACE);
|
||||
|
||||
request.setType(IQ.Type.error);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue