use of org.forgerock.openam.entitlement.rest.query.QueryAttribute in project OpenAM by OpenRock.
the class PrivilegePolicyStoreTest method setupMocks.
@BeforeMethod
public void setupMocks() {
mockManager = mock(PrivilegeManager.class);
Map<String, QueryAttribute> queryAttributes = new HashMap<String, QueryAttribute>();
queryAttributes.put(STRING_ATTRIBUTE, new QueryAttribute(AttributeType.STRING, STRING_SEARCH_ATTRIBUTE));
queryAttributes.put(NUMERIC_ATTRIBUTE, new QueryAttribute(AttributeType.NUMBER, NUMERIC_SEARCH_ATTRIBUTE));
queryAttributes.put(DATE_ATTRIBUTE, new QueryAttribute(AttributeType.TIMESTAMP, DATE_SEARCH_ATTRIBUTE));
testStore = new PrivilegePolicyStore(mockManager, queryAttributes);
}
use of org.forgerock.openam.entitlement.rest.query.QueryAttribute 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;
}
};
}
Aggregations