Skip to content

Commit

Permalink
Closes Taskana#2521 - Fix code smells use isEmpty() instead of hasSiz…
Browse files Browse the repository at this point in the history
…e(0)
  • Loading branch information
mmenv committed Mar 8, 2024
1 parent 3cc9a02 commit 4b9517d
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ void should_DeleteTaskComment_For_TaskCommentId() throws Exception {
taskService.deleteTaskComment(comment1.getId());

List<TaskComment> taskCommentsAfterDeletion = taskService.getTaskComments(task1.getId());
assertThat(taskCommentsAfterDeletion).hasSize(0);
assertThat(taskCommentsAfterDeletion).isEmpty();
}

@WithAccessId(user = "user-1-2", groups = "user-1-1")
Expand Down Expand Up @@ -129,7 +129,7 @@ void should_FailToDeleteTaskComment_When_UserHasNoAuthorization() throws Excepti
});
List<TaskComment> taskCommentsAfterDeletionWithAdmin =
taskService.getTaskComments(task1.getId());
assertThat(taskCommentsAfterDeletionWithAdmin).hasSize(0);
assertThat(taskCommentsAfterDeletionWithAdmin).isEmpty();
}

@WithAccessId(user = "admin")
Expand All @@ -146,7 +146,7 @@ void should_DeleteTaskComment_When_UserIsInAdministrativeRole() throws Exception
taskService.deleteTaskComment(comment1.getId());

List<TaskComment> taskCommentsAfterDeletion = taskService.getTaskComments(task1.getId());
assertThat(taskCommentsAfterDeletion).hasSize(0);
assertThat(taskCommentsAfterDeletion).isEmpty();
}

@WithAccessId(user = "user-1-1")
Expand Down

0 comments on commit 4b9517d

Please sign in to comment.