Search in sources :

Example 31 with AfterClass

use of org.testng.annotations.AfterClass in project OpenAM by OpenRock.

the class IOTest method cleanup.

@AfterClass
public void cleanup() {
    File f = new File(FILENAME);
    f.delete();
    f = new File(JSON_FILENAME);
    f.delete();
}
Also used : File(java.io.File) AfterClass(org.testng.annotations.AfterClass)

Example 32 with AfterClass

use of org.testng.annotations.AfterClass in project OpenAM by OpenRock.

the class ListenerRestTest method cleanup.

@AfterClass
public void cleanup() throws Exception {
    PrivilegeManager pm = PrivilegeManager.getInstance(REALM, adminSubject);
    pm.remove(PRIVILEGE_NAME);
    IdRepoUtils.deleteIdentity(REALM, agent);
}
Also used : PrivilegeManager(com.sun.identity.entitlement.PrivilegeManager) AfterClass(org.testng.annotations.AfterClass)

Example 33 with AfterClass

use of org.testng.annotations.AfterClass in project OpenAM by OpenRock.

the class MetaDataTest method cleanup.

@AfterClass
public void cleanup() throws Exception {
    SSOToken adminToken = (SSOToken) AccessController.doPrivileged(AdminTokenAction.getInstance());
    deleteUser(adminToken);
    PolicyManager pm = new PolicyManager(adminToken, "/");
    pm.removePolicy(POLICY_NAME);
}
Also used : SSOToken(com.iplanet.sso.SSOToken) AfterClass(org.testng.annotations.AfterClass)

Example 34 with AfterClass

use of org.testng.annotations.AfterClass in project OpenAM by OpenRock.

the class OpenProvisioning method cleanup.

@AfterClass
public void cleanup() throws SSOException, IdRepoException, EntitlementException {
    SSOToken adminToken = (SSOToken) AccessController.doPrivileged(AdminTokenAction.getInstance());
    AMIdentityRepository amir = new AMIdentityRepository(adminToken, "/");
    Set<AMIdentity> identities = new HashSet<AMIdentity>();
    identities.add(jSmith);
    identities.add(johnDoe);
    identities.add(branchMgr);
    amir.deleteIdentities(identities);
    PrivilegeManager pMgr = new PolicyPrivilegeManager(applicationServiceFactory, resourceTypeService, constraintValidator);
    pMgr.initialize("/", SubjectUtils.createSubject(adminToken));
    pMgr.remove(PRIVILEGE_NAME);
}
Also used : SSOToken(com.iplanet.sso.SSOToken) PolicyPrivilegeManager(com.sun.identity.entitlement.opensso.PolicyPrivilegeManager) PrivilegeManager(com.sun.identity.entitlement.PrivilegeManager) AMIdentity(com.sun.identity.idm.AMIdentity) AMIdentityRepository(com.sun.identity.idm.AMIdentityRepository) PolicyPrivilegeManager(com.sun.identity.entitlement.opensso.PolicyPrivilegeManager) HashSet(java.util.HashSet) AfterClass(org.testng.annotations.AfterClass)

Example 35 with AfterClass

use of org.testng.annotations.AfterClass in project OpenAM by OpenRock.

the class UserPrivilegeTest method cleanup.

@AfterClass
public void cleanup() throws Exception {
    Set identities = new HashSet();
    identities.add(user);
    amir.deleteIdentities(identities);
}
Also used : Set(java.util.Set) HashSet(java.util.HashSet) HashSet(java.util.HashSet) AfterClass(org.testng.annotations.AfterClass)

Aggregations

AfterClass (org.testng.annotations.AfterClass)37 OrganizationConfigManager (com.sun.identity.sm.OrganizationConfigManager)9 HashSet (java.util.HashSet)9 AMIdentity (com.sun.identity.idm.AMIdentity)8 SSOToken (com.iplanet.sso.SSOToken)6 PrivilegeManager (com.sun.identity.entitlement.PrivilegeManager)6 AMIdentityRepository (com.sun.identity.idm.AMIdentityRepository)5 File (java.io.File)4 PolicyPrivilegeManager (com.sun.identity.entitlement.opensso.PolicyPrivilegeManager)3 SSOException (com.iplanet.sso.SSOException)2 FutureCallback (com.linkedin.common.callback.FutureCallback)2 None (com.linkedin.common.util.None)2 Client (com.linkedin.r2.transport.common.Client)2 TransportClientFactory (com.linkedin.r2.transport.common.TransportClientFactory)2 IdRepoException (com.sun.identity.idm.IdRepoException)2 PolicyManager (com.sun.identity.policy.PolicyManager)2 Path (java.nio.file.Path)1 Set (java.util.Set)1 KafkaServerStartable (kafka.server.KafkaServerStartable)1 Logger (org.apache.log4j.Logger)1