File tree Expand file tree Collapse file tree 2 files changed +8
-7
lines changed
src/test/java/com/hivemq/common/i18n Expand file tree Collapse file tree 2 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -415,6 +415,7 @@ license {
415415 header = file(" HEADER" )
416416 mapping(" java" , " SLASHSTAR_STYLE" )
417417 exclude(" *.json" )
418+ exclude(" **/*.properties" )
418419 exclude(" **/*.xml" )
419420 exclude(" **/RollingList.java" )
420421 exclude(" **/api/**/*.java" )
Original file line number Diff line number Diff line change @@ -55,14 +55,14 @@ public void whenLocaleIsEnUS_thenErrorCountShouldMatch() throws IOException {
5555 .getResourceName (), StandardCharsets .UTF_8 ))) {
5656 properties .load (stringReader );
5757 }
58- assertThat (properties .size ()).isEqualTo (errors .size ());
59- final Set <Object > keySet = properties .keySet ();
60- errors .forEach (error -> assertThat (keySet .contains (error .getKey ())).as (error .getKey () + " is not found." )
61- .isTrue ());
62- properties .values ().forEach (template -> {
63- assertThat (template ).isInstanceOf (String .class );
64- assertThat ((String ) template ).isNotBlank ();
58+ final Set <Object > propertyKeySet = properties .keySet ();
59+ final Set <String > errorKeySet = errors .stream ().map (I18nHttpError ::getKey ).collect (Collectors .toSet ());
60+ propertyKeySet .forEach (key -> {
61+ assertThat (key ).isInstanceOf (String .class );
62+ assertThat (errorKeySet .contains ((String ) key )).as (key + " is not found in the enum." ).isTrue ();
6563 });
64+ errorKeySet .forEach (key -> assertThat (propertyKeySet .contains (key )).as (key + " is not found in the properties." )
65+ .isTrue ());
6666 }
6767
6868 @ Test
You can’t perform that action at this time.
0 commit comments