Search in sources :

Example 6 with AdviceExpressions

use of com.sun.identity.entitlement.xacml3.core.AdviceExpressions in project OpenAM by OpenRock.

the class XACMLSchemaFactoryTest method assertEqualAdviceExpressions.

/**
     * Assert that two advice expressions objects contain the same values, i.e. that the advice expression objects
     * they contain, contain the same values.
     * @param aes1 the first advice expressions object
     * @param aes2 the second advice expressions object
     */
private void assertEqualAdviceExpressions(final AdviceExpressions aes1, final AdviceExpressions aes2) {
    assertThat(aes1.getAdviceExpression().size()).isEqualTo(aes2.getAdviceExpression().size());
    for (AdviceExpression ae : aes1.getAdviceExpression()) {
        boolean found = false;
        for (AdviceExpression other : aes2.getAdviceExpression()) {
            if (checkEqualAdviceExpressionValues(ae, other)) {
                found = true;
                break;
            }
        }
        assertThat(found).isTrue();
    }
}
Also used : AdviceExpression(com.sun.identity.entitlement.xacml3.core.AdviceExpression)

Aggregations

ResourceAttribute (com.sun.identity.entitlement.ResourceAttribute)4 AdviceExpressions (com.sun.identity.entitlement.xacml3.core.AdviceExpressions)4 AdviceExpression (com.sun.identity.entitlement.xacml3.core.AdviceExpression)3 Entitlement (com.sun.identity.entitlement.Entitlement)2 EntitlementCondition (com.sun.identity.entitlement.EntitlementCondition)2 EntitlementSubject (com.sun.identity.entitlement.EntitlementSubject)2 Privilege (com.sun.identity.entitlement.Privilege)1 ReferralPrivilege (com.sun.identity.entitlement.ReferralPrivilege)1 PolicyResponseProvider (com.sun.identity.entitlement.opensso.PolicyResponseProvider)1 XACMLOpenSSOPrivilege (com.sun.identity.entitlement.opensso.XACMLOpenSSOPrivilege)1 AnyOf (com.sun.identity.entitlement.xacml3.core.AnyOf)1 AttributeValue (com.sun.identity.entitlement.xacml3.core.AttributeValue)1 Condition (com.sun.identity.entitlement.xacml3.core.Condition)1 Match (com.sun.identity.entitlement.xacml3.core.Match)1 Policy (com.sun.identity.entitlement.xacml3.core.Policy)1 Rule (com.sun.identity.entitlement.xacml3.core.Rule)1 Target (com.sun.identity.entitlement.xacml3.core.Target)1 VariableDefinition (com.sun.identity.entitlement.xacml3.core.VariableDefinition)1 Version (com.sun.identity.entitlement.xacml3.core.Version)1 SimpleDateFormat (java.text.SimpleDateFormat)1