mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-10 10:49:41 +02:00
Add Integration Test Framework
and resurrect a few integration tests.
This commit is contained in:
parent
4e6fbe7293
commit
b8f046706b
34 changed files with 2333 additions and 100 deletions
|
@ -31,35 +31,6 @@ public class LoginTest extends SmackTestCase {
|
|||
super(arg0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that the server is returning the correct error when trying to login using an invalid
|
||||
* (i.e. non-existent) user.
|
||||
*/
|
||||
public void testInvalidLogin() {
|
||||
try {
|
||||
XMPPTCPConnection connection = createConnection();
|
||||
connection.connect();
|
||||
try {
|
||||
// Login with an invalid user
|
||||
connection.login("invaliduser" , "invalidpass");
|
||||
connection.disconnect();
|
||||
fail("Invalid user was able to log into the server");
|
||||
}
|
||||
catch (XMPPException e) {
|
||||
if (e.getXMPPError() != null) {
|
||||
assertEquals("Incorrect error code while login with an invalid user", 401,
|
||||
e.getXMPPError().getCode());
|
||||
}
|
||||
}
|
||||
// Wait here while trying tests with exodus
|
||||
//Thread.sleep(300);
|
||||
}
|
||||
catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
fail(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Check that the server handles anonymous users correctly.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue