Skip to content

Commit

Permalink
Test coverage for toString()
Browse files Browse the repository at this point in the history
  • Loading branch information
vhemery committed Nov 21, 2024
1 parent 369febe commit 3f9bbbe
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ void should_offset_beKeywordDiscouragedBy_H2_MySQL_Postgres() {
Grammar.H2, Grammar.MYSQL, Grammar.POSTGRES);
}

@Test
void shouldToString_beDefindeForEachGrammar() {
for (var gram : Grammar.values()) {
var toString = gram.toString();
assertThat(toString).isNotEmpty();
if (gram != Grammar.H2) {
assertThat(toString).isNotEqualTo(gram.name());
}
}
}

@Test
void should_isKeywordDiscouragedBy_ReturnsEmpty() {
assertThat(sqlNameValidator.isKeywordDiscouragedBy("employee")).isEmpty();
Expand Down

0 comments on commit 3f9bbbe

Please sign in to comment.