ConnectionMother is a simple framework to ease Unit Tests with classes that uses JDBC.
It's been made based in the ObjectMother pattern
and it hides the complexity to make a fake database connection.
Example, It's normal to create a Connection that create a CallableStatement and so brings a ResultSet.
Using the MockObjects pattern, it would be necessary to create a MockConnection,
a MockCallableStatement and a MockResultSet, each one with many call to setString(..), close(), registerOutParameter()...
ConnectionMother simplify extremely these setups.
It uses EasyMock API. Now compatible with version 1.1
During of the development of AIDF project (Autorização para Impressão de Documentos Fiscais, Authorization for Fiscal Document Impression), we started using Extreme Programming and Test-Driven-Development. However, the system depends on data base.
Trying to create a solution, we create this framework, simple and efficient to test these classes highly connected to the data base.
This framework has been evolved, and not really planed. Therefore, they lack some functionalities that are useful for others, but does not stop in the current project. To the few, our plan is to complete these functionalities.
Make a nice use! If needs help, talk with us.