We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The text was updated successfully, but these errors were encountered:
We are going to single test like:
@Autowired private List<DatabaseCheckOnHost<? extends DbObject>> checks; @Test void checksShouldWork() { assertThat(checks) .hasSameSizeAs(Diagnostic.values()); checks.forEach(c -> assertThat(c.check()).isEmpty()); checks.forEach(c -> switch (c.getDiagnostic()) { case BLOATED_TABLES: assertThat(c.check()) .hasSize(1) .containsExactlyInAnyOrder( IndexWithBloat.of("t", "i", 0L, 0L, 0L) ); break; case INVALID_INDEXES: assertThat(c.check()) .hasSize(0); break; default: assertThat(c.check()).isEmpty(); } ); }
Sorry, something went wrong.
See assertj/assertj#772
@SuppressWarnings("PMD.JUnitTestsShouldIncludeAssert") @Test void shouldWorkForPublicSchema() { checks.forEach(c -> { final List<? extends DbObject> checkResult = c.check(); switch (c.getDiagnostic()) { case TABLES_WITHOUT_PRIMARY_KEY, TABLES_WITHOUT_DESCRIPTION -> assertThat(checkResult) .asInstanceOf(list(Table.class)) .hasSize(1) // HOW TO FIX: just add liquibase table to exclusions .containsExactly(Table.of("databasechangelog", 0L)); default -> assertThat(checkResult).isEmpty(); } }); }
Records cannot be used for models because of public constructors https://stackoverflow.com/questions/76843519/how-to-hide-constructor-on-a-java-record-that-offers-a-public-static-factory-met
No branches or pull requests
The text was updated successfully, but these errors were encountered: