next up previous
Next: Dbunit tests Up: Implementation Previous: Implementation

JUnit tests

  1. ConfigurationTest.testAddDatabase() - a JUnit test that tests the use of Configuration.addDatabase() method. It takes the list of defined connections with Configuration.getConnections(), adds an entry with Configuration.addDatabase(), gets the list once more, and compare it with the previous one.

  2. ConfigurationTest.testRemoveDatabase() - a JUnit test for Configuration.removeDatabase() method. It works very simillar to the Configuration.testAddDatabase() test.

  3. ConfigurationTest.testGetInstance() - a JUnit test for checking if the Singleton design pattern is implemented as it should be.

  4. ConfigurationTest.testIO() - a JUnit test for checking if save/load operations (performed by Configuration.saveData(), and Configuration.restoreData() respectively) on configuration file works good. The test consists of sequences of save, modify, load, and compare operations on the configuration data.

  5. AuthenticationTest.testWrongPassword() - a HTTPUnit test that tries to log into the system using wrong password

  6. AuthenticationTest.testEmptyPassword() - a HTTPUnit test that tries to log into the system without specifying any password

  7. AuthenticationTest.testMessingWithPasswords() - a HTTPUnit test that tries to log into the system, change current password using Settings interface, tries to log in with the old password, logs in with the new password, change password back to the original one, and tries loging in with old and current password once more.

  8. DatabaseConnectorFactoryTest.testGetInstance() - JUnit tests whether the Singleton desing pattern works properly, that is one and only one instane of DatabaseConnectorFactory class exists

  9. DatabaseConnectorFactoryTest.testCreateConnector()- JUnit tests whether the Factory design pattern works properly; that means createConnector method produces the proper DatabaseConnector on the basic of user's needs (e.g. MysqlConnector, Postgresql connector)

  10. DatabaseConnectorFactory.listPlugins() - Junit test whether the listPlugins method return classes that extend DataBaseConnector

  11. MysqlconnectorTest.testConnect() - JUnit tests whether the Connection object has been created and checks if it is not null type

  12. MysqlconnectorTest.testDisconnect() - JUnit tests whether the connection has been closed

  13. MysqlconnectorTest.testCreateURL() - JUnit tests whether the connection URL has been properly created


next up previous
Next: Dbunit tests Up: Implementation Previous: Implementation
Wiktor Kolodziej 2006-01-12