Class AssertDbConnectionFactory

java.lang.Object
org.assertj.db.type.AssertDbConnectionFactory

public abstract class AssertDbConnectionFactory extends Object
Factory to create a AssertDbConnection from different database connection input ( Jdbc URL or DataSource ). Allow to configure behavior of connection provider like letter case or schema metadata retrieval mode.

For create with JDBC URL :

 
 AssertDbConnection connection = AssertDbConnectionFactory.of("jdbc:h2:mem:test", "sa", "").create();
 Table table = connection.table("movie").build();
 
 
For create with JDBC URL :
 
 DataSource dataSource = ...;
 AssertDbConnection connection = AssertDbConnectionFactory.of(dataSource).create();
 Table table = connection.table("song").columnToCheck(new String[] { "number", "title" }).build();
 
 
Since:
3.0.0
Author:
Julien Roy