资 源 简 介
Database testing easily in jUnit
DbAssert is a set of assertion methods for jUnit tests to verify your database data.
It uses non-intrusive way for writing unit tests, you don"t have to extend any specific class to be able to query and test your database. Initialize DbAssert and start making assertions against your database right away.
### Assert data ###
```
//Initialize DbAssert by passing YAML file defining the datasources.
dbAssert = DbAssert.init("org/testfw/Sources.yml");
//Set condition to search record by.
dbAssert.table("authors").where("id", 123).and("last_name", "Coupland") ;
// assert customers name column equals Douglas value in database.
dbAssert.assert_column("name", "Douglas");
//checks field name contains non-empty value
dbAssert.assertnotempty("bio");
// check if count of records returned more than one
dbAssert.assertco