@Test(dependsOnGroups = "a") public void cleanUp() throws Exception { response = client.deletePerson(this.uid); assertEquals(response.getStatusCode(), 200, "cold not delete the person, status != 200"); }
@Test(groups = "a") public void bulkOperationTest() throws Exception { response = client.bulkOperationString(REQUESTJSON, MediaType.APPLICATION_JSON); assertEquals(response.getStatusCode(), 200, "cold not Add the person, status != 200"); byte[] bytes = response.getResponseBody(); String responseStr = new String(bytes); scimBulkResponse = (ScimBulkResponse) jsonToObject(responseStr, ScimBulkResponse.class); String location = scimBulkResponse.getOperations().get(0).getLocation(); this.uid = getUID(location.split("/")); }
@Test @Parameters({"scim1.bulk.request_json"}) public void bulkOperationTest(String REQUESTJSON) throws Exception { ScimResponse response = client.bulkOperationString(REQUESTJSON, MediaType.APPLICATION_JSON); assertEquals(response.getStatusCode(), 200, "Could not add the person, status != 200"); byte[] bytes = response.getResponseBody(); String responseStr = new String(bytes); ScimBulkResponse scimBulkResponse = (ScimBulkResponse) jsonToObject(responseStr, ScimBulkResponse.class); String location = scimBulkResponse.getOperations().get(0).getLocation(); this.id = getUID(location.split("/")); }
@Test(dependsOnMethods = "bulkOperationTest") public void cleanUp() throws Exception { ScimResponse response = client.deletePerson(this.id); assertEquals(response.getStatusCode(), 200, "Could not delete the person, status != 200"); }