Search in sources :

Example 6 with AfterGroups

use of org.testng.annotations.AfterGroups in project rhsm-qe by RedHatQE.

the class ServiceLevelTests method afterSetDefaultServiceLevelForOrgAndRegister_Test.

@AfterGroups(value = { "SetDefaultServiceLevelForOrgAndRegister_Test" }, groups = { "setup" })
public void afterSetDefaultServiceLevelForOrgAndRegister_Test() throws Exception {
    // update the defaultServiceLevel on the Org (setting to "" will nullify the attribute on the org; setting to JSONObject.NULL does not work)
    if (orgForSetDefaultServiceLevelForOrgAndRegister_Test != null) {
        JSONObject jsonOrg = CandlepinTasks.setAttributeForOrg(sm_clientUsername, sm_clientPassword, sm_serverUrl, orgForSetDefaultServiceLevelForOrgAndRegister_Test, "defaultServiceLevel", "");
        // should be null
        jsonOrg.get("defaultServiceLevel");
    }
}
Also used : JSONObject(org.json.JSONObject) AfterGroups(org.testng.annotations.AfterGroups)

Aggregations

AfterGroups (org.testng.annotations.AfterGroups)6 JSONObject (org.json.JSONObject)4 BugzillaAPIException (com.redhat.qe.auto.bugzilla.BugzillaAPIException)1 BufferedWriter (java.io.BufferedWriter)1 File (java.io.File)1 FileWriter (java.io.FileWriter)1 IOException (java.io.IOException)1 Writer (java.io.Writer)1 DateFormat (java.text.DateFormat)1 SimpleDateFormat (java.text.SimpleDateFormat)1 JSONArray (org.json.JSONArray)1 BeforeGroups (org.testng.annotations.BeforeGroups)1 ProductCert (rhsm.data.ProductCert)1 SubscriptionPool (rhsm.data.SubscriptionPool)1