use of org.forgerock.openam.scripting.ScriptEvaluator in project OpenAM by OpenRock.
the class OpenAMScopeValidatorTest method setup.
@BeforeMethod
public void setup() throws Exception {
client = mock(ClientRegistration.class);
request = mock(OAuth2Request.class);
providerSettings = mock(OAuth2ProviderSettings.class);
clientRegistrationStore = mock(OpenIdConnectClientRegistrationStore.class);
OAuth2ProviderSettingsFactory factory = mock(OAuth2ProviderSettingsFactory.class);
when(factory.get(request)).thenReturn(providerSettings);
ScriptEvaluator scriptEvaluator = mock(ScriptEvaluator.class);
IdentityManager identityManager = mock(IdentityManager.class);
identity = mock(AMIdentity.class);
when(identityManager.getResourceOwnerIdentity(anyString(), anyString())).thenReturn(identity);
validator = new OpenAMScopeValidator(identityManager, null, factory, null, scriptEvaluator, clientRegistrationStore, null);
}
Aggregations