Skip to content

Commit

Permalink
chore: some clean up in assertj-db module
Browse files Browse the repository at this point in the history
  • Loading branch information
celcius112 committed Oct 18, 2023
1 parent 93a95ec commit c05b8e9
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ import org.skyscreamer.jsonassert.JSONCompareMode

class DbComparatorBuilder {

constructor()

constructor(
mode: JSONCompareMode,
validators: List<JsonValidator<*>>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,10 @@ class MSSQLTypeTest {

private fun customValidator(): JsonValidator<String> {
return validator {
templatedValidator<String>(
templatedValidator(
"custom_notempty",
comparator { actual, expected ->
if (actual == null || actual.isEmpty()) {
if (actual.isNullOrEmpty()) {
throw ValueMatcherException("Value is null or empty", expected, actual)
}
true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,10 @@ class MySQLTypeTest {

private fun customValidator(): JsonValidator<String> {
return validator {
templatedValidator<String>(
templatedValidator(
"custom_notempty",
comparator { actual, expected ->
if (actual == null || actual.isEmpty()) {
if (actual.isNullOrEmpty()) {
throw ValueMatcherException("Value is null or empty", expected, actual)
}
true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,10 @@ class PostgresTypeTest {

private fun customValidator(): JsonValidator<String> {
return validator {
templatedValidator<String>(
templatedValidator(
"custom_notempty",
comparator { actual, expected ->
if (actual == null || actual.isEmpty()) {
if (actual.isNullOrEmpty()) {
throw ValueMatcherException("Value is null or empty", expected, actual)
}
true
Expand Down

0 comments on commit c05b8e9

Please sign in to comment.