Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sadilchamishka committed Sep 20, 2023
1 parent 6295d35 commit 1e7d53a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ protected Response getResponseOfGet(String endpointUri) {
* @return Response of post request.
*/
protected Response getResponseOfPost(String endpointUri, String body) {

return given().auth().preemptive().basic(authenticatingUserName, authenticatingCredential)
.contentType(ContentType.JSON)
.header(HttpHeaders.ACCEPT, ContentType.JSON)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ public void init(ITestContext context) throws Exception {
orgId = SUPER_ORGANIZATION_ID;
}
this.subOrganizationId = orgId;
if (this.organizationType.name().equals("SUPER_ORGANIZATION")) {
if (OrganizationType.SUPER_ORGANIZATION.equals(this.organizationType)) {
super.testInitWithoutTenantQualifiedPath(API_VERSION, swaggerDefinition);
} else {
this.tenant = subOrganizationId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
package org.wso2.identity.integration.test.rest.api.server.organization.management.v1;

import io.restassured.response.Response;
import org.apache.commons.lang.StringUtils;
import org.apache.http.HttpStatus;
import org.json.JSONObject;
import org.testng.annotations.AfterMethod;
Expand Down Expand Up @@ -52,7 +53,7 @@ public void testCreateOrganizationWithoutRequiredField() throws Exception {
JSONObject organizationObject = new JSONObject();
String parentId;

if (organizationType.name().equals("SUPER_ORGANIZATION")) {
if (OrganizationType.SUPER_ORGANIZATION.equals(this.organizationType)) {
parentId = SUPER_ORGANIZATION_NAME;
} else {
parentId = subOrganizationId;
Expand All @@ -70,7 +71,7 @@ public void testCreateOrganizationWithABlankName() throws Exception {
JSONObject organizationObject = new JSONObject();
String parentId;

if (organizationType.name().equals("SUPER_ORGANIZATION")) {
if (OrganizationType.SUPER_ORGANIZATION.equals(this.organizationType)) {
parentId = SUPER_ORGANIZATION_NAME;
} else {
parentId = subOrganizationId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public void createOrganization() throws Exception {
String org;
String parentId;

if (organizationType.name().equals("SUPER_ORGANIZATION")) {
if (OrganizationType.SUPER_ORGANIZATION.equals(this.organizationType)) {
org = "Level1Org";
parentId = SUPER_ORGANIZATION_NAME;
} else {
Expand Down

0 comments on commit 1e7d53a

Please sign in to comment.