mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-10 18:59:41 +02:00
Change IQ.Type to enum
This commit is contained in:
parent
944ac37fc3
commit
9be0c480e3
90 changed files with 284 additions and 299 deletions
|
@ -62,7 +62,7 @@ public class IQTest extends SmackTestCase {
|
|||
if (result == null) {
|
||||
fail("No response from server");
|
||||
}
|
||||
else if (result.getType() != IQ.Type.ERROR) {
|
||||
else if (result.getType() != IQ.Type.error) {
|
||||
fail("The server didn't reply with an error packet");
|
||||
}
|
||||
else {
|
||||
|
@ -77,7 +77,7 @@ public class IQTest extends SmackTestCase {
|
|||
public void testFullJIDToOfflineUser() {
|
||||
// Request the version from the server.
|
||||
Version versionRequest = new Version();
|
||||
versionRequest.setType(IQ.Type.GET);
|
||||
versionRequest.setType(IQ.Type.get);
|
||||
versionRequest.setFrom(getFullJID(0));
|
||||
versionRequest.setTo(getBareJID(0) + "/Something");
|
||||
|
||||
|
@ -92,7 +92,7 @@ public class IQTest extends SmackTestCase {
|
|||
// Stop queuing results
|
||||
collector.cancel();
|
||||
assertNotNull("No response from server", result);
|
||||
assertEquals("The server didn't reply with an error packet", IQ.Type.ERROR, result.getType());
|
||||
assertEquals("The server didn't reply with an error packet", IQ.Type.error, result.getType());
|
||||
assertEquals("Server answered an incorrect error code", 503, result.getError().getCode());
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ public class PacketReaderTest extends SmackTestCase {
|
|||
}
|
||||
};
|
||||
iqPacket.setTo(getFullJID(1));
|
||||
iqPacket.setType(IQ.Type.GET);
|
||||
iqPacket.setType(IQ.Type.get);
|
||||
|
||||
// Send the IQ and wait for the answer
|
||||
PacketCollector collector = getConnection(0).createPacketCollector(
|
||||
|
@ -89,7 +89,7 @@ public class PacketReaderTest extends SmackTestCase {
|
|||
if (response == null) {
|
||||
fail("No response from the other user.");
|
||||
}
|
||||
assertEquals("The received IQ is not of type ERROR", IQ.Type.ERROR, response.getType());
|
||||
assertEquals("The received IQ is not of type ERROR", IQ.Type.error, response.getType());
|
||||
assertEquals("The error code is not 501", 501, response.getError().getCode());
|
||||
collector.cancel();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue