Getting Connections

Basic JDBC Connection

SQLUnit can build up a database Connection object using JDBC if the driver, URL, user and password are supplied. Here is an example of setting up a Connection object for the SQLUnit Mock Database.


<connection connection-id="1">
  <driver>net.sourceforge.sqlunit.test.mock.SQLUnitMockDriver</driver>
  <url>jdbc:mock:net.sourceforge.sqlunit.test.mock.SQLUnitMockDatabase</url>
  <user>defaultuser</user>
  <password>defaultuser</password>
</connection>