Skip to content

Commit 629fd5c

Browse files
committed
Fixed sonarq issues
1 parent fb8e595 commit 629fd5c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

service-projects/src/test/java/org/opendevstack/apiservice/serviceproject/service/impl/ProjectExistenceServiceImplTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ void is_project_found_returns_false_when_project_not_found_anywhere() throws Exc
103103
void is_project_found_throws_exception_when_bitbucket_fails() {
104104
when(projectService.getProject("KEY6")).thenReturn(null);
105105
when(bitbucketService.getAvailableInstances()).thenThrow(new RuntimeException("fail"));
106-
ProjectExistenceServiceException ex = assertThrows(ProjectExistenceServiceException.class, () -> sut.isProjectFound("KEY6"));
106+
assertThrows(ProjectExistenceServiceException.class, () -> sut.isProjectFound("KEY6"));
107107

108108
assertThrows(ProjectExistenceServiceException.class, () -> {
109109
sut.isProjectFound("KEY6");
@@ -116,7 +116,7 @@ void is_project_found_throws_exception_when_jira_fails() {
116116
when(bitbucketService.getAvailableInstances()).thenReturn(Collections.emptySet());
117117
when(jiraService.getAvailableInstances()).thenThrow(new RuntimeException("fail"));
118118

119-
ProjectExistenceServiceException ex = assertThrows(ProjectExistenceServiceException.class, () -> sut.isProjectFound("KEY7"));
119+
assertThrows(ProjectExistenceServiceException.class, () -> sut.isProjectFound("KEY7"));
120120

121121
assertThrows(ProjectExistenceServiceException.class, () -> {
122122
sut.isProjectFound("KEY7");

0 commit comments

Comments
 (0)