use of org.gluu.oxtrust.api.test.APITestException in project oxTrust by GluuFederation.
the class SamlTestScenary method run.
/**
* Run tests.
*
* @throws APITestException
* @throws OxTrustAPIException
*/
public void run() throws APITestException, OxTrustAPIException {
TrustRelationshipClient samlClient = client.getTrustRelationshipClient();
GluuSAMLTrustRelationship trGenerated = generateRandomeSingleTrustRelationship();
// test create()
String inum = samlClient.create(trGenerated);
// test read()
GluuSAMLTrustRelationship trReaded = samlClient.read(inum);
// TODO: compare etities
trReaded.setDescription("description changed");
// test update()
samlClient.update(trReaded, inum);
// test list()
List<SAMLTrustRelationshipShort> trustRelationships = samlClient.list();
if (!checkListForTrustRelationship(trustRelationships, inum))
throw new APITestException("TrustRelationship really not saved");
// test delete()
samlClient.delete(inum);
trustRelationships = samlClient.list();
if (checkListForTrustRelationship(trustRelationships, inum))
throw new APITestException("TrustRelationship really not deleted");
// TODO: all API calls
}
Aggregations