-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add assertions for database structure #12
Comments
It is a good idea. |
@regis1512 is anyone working on this? I'd like to take a crack on this as I have started some work on this out of necessity. |
This is my proposal for the APIs (not exhaustive list).
For completion, the inverse of the there should be additional methods for additional checks , like foreign key, uniqueness, non-nullability, auto-increment,... |
part for resolving assertj#12
@Avinash-Bhat Checking existence of table is implemented in release 1.3.0 |
I need assertions for checking database structure.
E.g. I want to check if specific table exists in database.
Proposed assertions:
assertThat(table).exists();
or
assertThat(source).tableExists("name");
Additionally it would be nice to have convinience method isEmpty() for
assertThat(table).hasNumberOfRows(0);
JDBC code to check if table exists ()
Or just do some operation and catch jdbc exception: table not exists. Below assertion partially does the trick, but is not elegant.
assertThat(table).hasNumberOfRows(0);
The text was updated successfully, but these errors were encountered: