Skip to content

Commit

Permalink
Fix formatting issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Shenali-SJ committed Sep 4, 2024
1 parent 73c70f2 commit ef6b7a6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
import org.apache.http.message.BasicNameValuePair;
import org.apache.http.util.EntityUtils;
import org.json.JSONException;
import org.json.JSONObject;
import org.testng.Assert;
import org.testng.annotations.AfterClass;
import org.testng.annotations.BeforeClass;
Expand Down Expand Up @@ -209,7 +210,7 @@ public void atEnd() throws Exception {
}

@Test(groups = "wso2.is", description = "Get access token with client credentials grant")
public void testGetAccessTokenWithClientCredentialsGrant() throws IOException, JSONException, ParseException {
public void testGetAccessTokenWithClientCredentialsGrant() throws Exception {

List<NameValuePair> parameters = new ArrayList<>();
parameters.add(new BasicNameValuePair("grant_type", OAuth2Constant.OAUTH2_GRANT_TYPE_CLIENT_CREDENTIALS));
Expand Down Expand Up @@ -239,7 +240,7 @@ public void testGetAccessTokenWithClientCredentialsGrant() throws IOException, J
getTenantQualifiedURL(ACCESS_TOKEN_ENDPOINT, tenantInfo.getDomain()));

String responseString = EntityUtils.toString(response.getEntity(), "UTF-8");
org.json.JSONObject jsonResponse = new org.json.JSONObject(responseString);
JSONObject jsonResponse = new JSONObject(responseString);

assertTrue(jsonResponse.has("access_token"), "Access token not found in the token response.");
accessToken = jsonResponse.getString("access_token");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
import org.wso2.identity.integration.test.utils.OAuth2Constant;

import java.io.IOException;
import java.util.Arrays;

/**
* Rest client which provides methods to interact with the Actions REST API.
Expand Down

0 comments on commit ef6b7a6

Please sign in to comment.