use of org.wso2.carbon.consent.mgt.core.model.PIICategory in project product-is by wso2.
the class ConsentMgtTestCase method testAddPIICategory.
@Test(alwaysRun = true, groups = "wso2.is", description = "Add PII Category test")
public void testAddPIICategory() {
String name = "http://wso2.org/claims/organization";
String description = "Organization";
JSONObject response = addPIICategory(name, description);
Assert.assertEquals(name, response.get("piiCategory"));
Assert.assertEquals(description, response.get("description"));
Assert.assertEquals(true, response.get("sensitive"));
}
use of org.wso2.carbon.consent.mgt.core.model.PIICategory in project product-is by wso2.
the class SelfSignUpConsentTest method addPIICategory.
private void addPIICategory(String name, String description) {
RestClient restClient = new RestClient();
Resource piiCatResource = restClient.resource(consentEndpoint + "/" + "pii-categories");
String addPIICatString = "{\"piiCategory\": " + "\"" + name + "\"" + ", \"description\": " + "\"" + description + "\" , \"sensitive\": \"" + true + "\"}";
User user = new User();
user.setUserName(tenantAdminUserName);
user.setPassword(ADMIN);
piiCatResource.contentType(MediaType.APPLICATION_JSON_TYPE).accept(MediaType.APPLICATION_JSON).header(HttpHeaders.AUTHORIZATION, getBasicAuthHeader(user)).post(String.class, addPIICatString);
}
Aggregations