Methods Summary |
---|
void | cleanUp()Provide clean-up services, following the run of this test.
closeConnection();
|
private void | closeConnection()Close the SMS connection.
try {
con.close();
} catch (IOException ioe) {
// Fail silently.
} catch (Exception e) {
// Fail silently.
}
|
private void | createClientConnection(java.lang.String clientAddress)Create and open an SMS connection.
con = (MessageConnection)Connector.open(clientAddress);
|
public void | run()Simply close the open connection. If successful, this test passes.
try {
closeConnection();
/*
* Close connection again. This is allowed by the spec
* and shouldn't cause any exceptions to be thrown.
*/
closeConnection();
passed = true;
assertTrue("This indicates we passed.", passed);
} catch (Exception e) {
e.printStackTrace();
System.out.println(e.getMessage());
}
|
public void | runTests()Main entry point.
setUp();
declare(TEST_NAME);
run();
cleanUp();
|
void | setUp()Set up the physical connection.
try {
createClientConnection(SMS_CLIENT_ADDRESS);
} catch (IOException ioe) {
System.out.println(TEST_NAME + " set-up failed:");
ioe.printStackTrace();
}
|