Search in sources :

Example 11 with ResourceSaveIndexes

use of com.sun.identity.entitlement.ResourceSaveIndexes in project OpenAM by OpenRock.

the class ResourceNameIndexTest method testPathParent.

@Test
public void testPathParent() throws Exception {
    ResourceNameIndexGenerator gen = new ResourceNameIndexGenerator();
    Map<String, Set<String>> map = parseResources("resourceNameIndexPathParent");
    for (String k : map.keySet()) {
        Set<String> expectedResult = map.get(k);
        ResourceSaveIndexes indexes = gen.getIndexes(k);
        if (!indexes.getParentPathIndexes().equals(expectedResult)) {
            String msg = "ResourceNameIndexTest.testPathParent: " + k + " failed.";
            UnittestLog.logError(msg);
            throw new Exception(msg);
        }
    }
}
Also used : ResourceSaveIndexes(com.sun.identity.entitlement.ResourceSaveIndexes) HashSet(java.util.HashSet) Set(java.util.Set) Test(org.testng.annotations.Test)

Aggregations

ResourceSaveIndexes (com.sun.identity.entitlement.ResourceSaveIndexes)11 HashSet (java.util.HashSet)8 Test (org.testng.annotations.Test)6 Set (java.util.Set)4 SSOException (com.iplanet.sso.SSOException)2 EntitlementException (com.sun.identity.entitlement.EntitlementException)2 SMSEntry (com.sun.identity.sm.SMSEntry)2 SMSException (com.sun.identity.sm.SMSException)2 Collections.emptySet (java.util.Collections.emptySet)2 HashMap (java.util.HashMap)2 SSOToken (com.iplanet.sso.SSOToken)1 Entitlement (com.sun.identity.entitlement.Entitlement)1 IPrivilege (com.sun.identity.entitlement.IPrivilege)1 Privilege (com.sun.identity.entitlement.Privilege)1 ReferralPrivilege (com.sun.identity.entitlement.ReferralPrivilege)1 MalformedURLException (java.net.MalformedURLException)1 Subject (javax.security.auth.Subject)1 JSONException (org.json.JSONException)1