Search in sources :

Example 1 with ScriptingDataStoreFactory

use of org.forgerock.openam.scripting.datastore.ScriptingDataStoreFactory in project OpenAM by OpenRock.

the class ScriptConfigurationServiceTest method setUp.

@BeforeMethod
public void setUp() throws ResourceException {
    Logger logger = mock(Logger.class);
    Subject subject = new Subject();
    subject.getPrincipals().add(testUserPrinciple);
    dataStore = mock(ScriptingDataStore.class);
    ScriptingDataStoreFactory dataStoreFactory = mock(ScriptingDataStoreFactory.class);
    when(dataStoreFactory.create(any(Subject.class), anyString())).thenReturn(dataStore);
    service = new ScriptConfigurationService(logger, subject, "/", dataStoreFactory);
}
Also used : ScriptingDataStoreFactory(org.forgerock.openam.scripting.datastore.ScriptingDataStoreFactory) ScriptingDataStore(org.forgerock.openam.scripting.datastore.ScriptingDataStore) Logger(org.slf4j.Logger) Subject(javax.security.auth.Subject) BeforeMethod(org.testng.annotations.BeforeMethod)

Aggregations

Subject (javax.security.auth.Subject)1 ScriptingDataStore (org.forgerock.openam.scripting.datastore.ScriptingDataStore)1 ScriptingDataStoreFactory (org.forgerock.openam.scripting.datastore.ScriptingDataStoreFactory)1 Logger (org.slf4j.Logger)1 BeforeMethod (org.testng.annotations.BeforeMethod)1