Skip to content

Commit

Permalink
fix: not correct shown unsupported fields (#26)
Browse files Browse the repository at this point in the history
  • Loading branch information
Oleksiivanov authored Nov 14, 2022
2 parents 55b493a + c4ea1d8 commit c1f9e95
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public static JsonElement validateAmqpBasicPropertiesOrThrowException(JsonElemen
.anyMatch(f -> f.getName().equals(entry.getKey()));
if (!fieldExist) {
throw new IllegalArgumentException(
"Unsupported field '" + entry.getKey() + "' for properties");
"Unsupported field \'" + entry.getKey() + "\' for properties");
}
}
return jsonElement;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ void validateAmqpBasicPropertiesOrThrowException_shouldThrowExceptionWhenNameOfP
IllegalArgumentException.class,
() -> ValidationPropertiesUtil.validateAmqpBasicPropertiesOrThrowException(properties),
"IllegalArgumentException was expected");
assertThat(thrown.getMessage()).contains("Unsupported field", "for properties");
assertThat(thrown.getMessage()).contains("Unsupported field '", "' for properties");
}
}

0 comments on commit c1f9e95

Please sign in to comment.