Search in sources :

Example 1 with ApplicationManagerWrapper

use of org.forgerock.openam.entitlement.rest.wrappers.ApplicationManagerWrapper in project OpenAM by OpenRock.

the class ApplicationsResourceTest method setUp.

@BeforeMethod
public void setUp() {
    debug = mock(Debug.class);
    applicationManagerWrapper = mock(ApplicationManagerWrapper.class);
    applicationTypeManagerWrapper = mock(ApplicationTypeManagerWrapper.class);
    applicationWrapper = mock(ApplicationWrapper.class);
    queryAttributes = new HashMap<String, QueryAttribute>();
    queryAttributes.put(STRING_ATTRIBUTE, new QueryAttribute(AttributeType.STRING, new SearchAttribute(STRING_ATTRIBUTE, "ou")));
    queryAttributes.put(NUMERIC_ATTRIBUTE, new QueryAttribute(AttributeType.NUMBER, new SearchAttribute(NUMERIC_ATTRIBUTE, "ou")));
    queryAttributes.put(DATE_ATTRIBUTE, new QueryAttribute(AttributeType.TIMESTAMP, new SearchAttribute(DATE_ATTRIBUTE, "ou")));
    applicationsResource = new ApplicationsResource(debug, applicationManagerWrapper, applicationTypeManagerWrapper, queryAttributes, resourceErrorHandler) {

        @Override
        protected ApplicationWrapper createApplicationWrapper(JsonValue jsonValue, Subject mySubject) throws EntitlementException {
            return applicationWrapper;
        }
    };
}
Also used : ApplicationTypeManagerWrapper(org.forgerock.openam.entitlement.rest.wrappers.ApplicationTypeManagerWrapper) JsonValue(org.forgerock.json.JsonValue) Matchers.anyString(org.mockito.Matchers.anyString) ApplicationManagerWrapper(org.forgerock.openam.entitlement.rest.wrappers.ApplicationManagerWrapper) Subject(javax.security.auth.Subject) SearchAttribute(com.sun.identity.entitlement.util.SearchAttribute) EntitlementException(com.sun.identity.entitlement.EntitlementException) ApplicationWrapper(org.forgerock.openam.entitlement.rest.wrappers.ApplicationWrapper) QueryAttribute(org.forgerock.openam.entitlement.rest.query.QueryAttribute) Debug(com.sun.identity.shared.debug.Debug) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

EntitlementException (com.sun.identity.entitlement.EntitlementException)1 SearchAttribute (com.sun.identity.entitlement.util.SearchAttribute)1 Debug (com.sun.identity.shared.debug.Debug)1 Subject (javax.security.auth.Subject)1 JsonValue (org.forgerock.json.JsonValue)1 QueryAttribute (org.forgerock.openam.entitlement.rest.query.QueryAttribute)1 ApplicationManagerWrapper (org.forgerock.openam.entitlement.rest.wrappers.ApplicationManagerWrapper)1 ApplicationTypeManagerWrapper (org.forgerock.openam.entitlement.rest.wrappers.ApplicationTypeManagerWrapper)1 ApplicationWrapper (org.forgerock.openam.entitlement.rest.wrappers.ApplicationWrapper)1 Matchers.anyString (org.mockito.Matchers.anyString)1 BeforeMethod (org.testng.annotations.BeforeMethod)1