Search in sources :

Example 11 with ResourceSearchIndexes

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

the class ResourceNameSplitTest method testPath.

@Test
public boolean testPath() throws Exception {
    ResourceNameSplitter splitter = new ResourceNameSplitter();
    Map<String, Set<String>> map = parseResource("resourceNameSplitURI");
    for (String k : map.keySet()) {
        Set<String> set = map.get(k);
        ResourceSearchIndexes comp = splitter.getIndexes(k, null);
        Set<String> results = comp.getPathIndexes();
        if (!results.equals(set)) {
            String msg = "ResourceNameSplitTest.testPath: " + k + " failed.";
            UnittestLog.logError(msg);
            throw new Exception(msg);
        }
    }
    return true;
}
Also used : HashSet(java.util.HashSet) Set(java.util.Set) ResourceSearchIndexes(com.sun.identity.entitlement.ResourceSearchIndexes) Test(org.testng.annotations.Test)

Aggregations

ResourceSearchIndexes (com.sun.identity.entitlement.ResourceSearchIndexes)11 HashSet (java.util.HashSet)9 Test (org.testng.annotations.Test)5 IPrivilege (com.sun.identity.entitlement.IPrivilege)3 Privilege (com.sun.identity.entitlement.Privilege)3 Set (java.util.Set)3 SSOToken (com.iplanet.sso.SSOToken)2 ApplicationPrivilege (com.sun.identity.entitlement.ApplicationPrivilege)2 ReferralPrivilege (com.sun.identity.entitlement.ReferralPrivilege)2 SSOException (com.iplanet.sso.SSOException)1 EntitlementException (com.sun.identity.entitlement.EntitlementException)1 EntitlementSubject (com.sun.identity.entitlement.EntitlementSubject)1 OrSubject (com.sun.identity.entitlement.OrSubject)1 PrivilegeIndexStore (com.sun.identity.entitlement.PrivilegeIndexStore)1 SubjectAttributesManager (com.sun.identity.entitlement.SubjectAttributesManager)1 MalformedURLException (java.net.MalformedURLException)1 ArrayList (java.util.ArrayList)1 Matcher (java.util.regex.Matcher)1 Subject (javax.security.auth.Subject)1 DN (org.forgerock.opendj.ldap.DN)1