Skip to content

Commit

Permalink
Fix NoQualityGateTest
Browse files Browse the repository at this point in the history
  • Loading branch information
Topin2001 committed Jun 4, 2024
1 parent d6568f7 commit 840139b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void getQualityGatesWithCorrespondingDetailsTest() throws BadSonarQubeReq
assertFalse(list.get(1).isDefault());
}

@Test(expected = NullPointerException.class) //To be fixed, should be UnknownQualityGateException
@Test(expected = UnknownQualityGateException.class)
public void getProjectNoQualityGateTest() throws UnknownQualityGateException, BadSonarQubeRequestException, SonarQubeException {
// Empty API response
JsonObject empty = new JsonObject();
Expand All @@ -88,6 +88,7 @@ public void getProjectNoQualityGateTest() throws UnknownQualityGateException, Ba

JsonObject qualityGateProperty = new JsonObject();
qualityGateProperty.addProperty("key", "no_matching_key");
qualityGateProperty.addProperty("name", "No matching name");
JsonObject project = new JsonObject();
project.add("qualityGate", qualityGateProperty);

Expand Down

0 comments on commit 840139b

Please sign in to comment.