Skip to content

Commit

Permalink
Closes #91 - fix Sonarcloud issues
Browse files Browse the repository at this point in the history
  • Loading branch information
ryzheboka committed Oct 25, 2024
1 parent f6ff867 commit a4b7f32
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ void testUpdatedAccessItemList_accessId_null() throws Exception {

WorkbasketAccessItemImpl workbasketAccessItem = ((WorkbasketAccessItemImpl) accessItems.get(0));
workbasketAccessItem.setAccessId(null);
List<WorkbasketAccessItem> workbasketAccessItems = List.of(workbasketAccessItem);

assertThatThrownBy(
() -> WORKBASKET_SERVICE.setWorkbasketAccessItems(wbId, List.of(workbasketAccessItem)))
() -> WORKBASKET_SERVICE.setWorkbasketAccessItems(wbId, workbasketAccessItems))
.isInstanceOf(InvalidArgumentException.class)
.hasMessageContaining("accessId is null or empty");
}
Expand All @@ -77,9 +78,10 @@ void testUpdatedAccessItemList_accessId_blank() throws Exception {

WorkbasketAccessItemImpl workbasketAccessItem = ((WorkbasketAccessItemImpl) accessItems.get(0));
workbasketAccessItem.setAccessId(" ");
List<WorkbasketAccessItem> workbasketAccessItems = List.of(workbasketAccessItem);

assertThatThrownBy(
() -> WORKBASKET_SERVICE.setWorkbasketAccessItems(wbId, List.of(workbasketAccessItem)))
() -> WORKBASKET_SERVICE.setWorkbasketAccessItems(wbId, workbasketAccessItems))
.isInstanceOf(InvalidArgumentException.class)
.hasMessageContaining("accessId is null or empty");
}
Expand Down

0 comments on commit a4b7f32

Please sign in to comment.