| /forgerock/opendj-v3/opendj-server-legacy/src/test/java/org/opends/server/backends/jeb/ |
| H A D | JETestCase.java | 28 import static org.mockito.Mockito.when; 49 when(backendCfg.getBackendId()).thenReturn("JETestCase"); 50 when(backendCfg.getDBDirectory()).thenReturn("JETestCase"); 51 when(backendCfg.getDBDirectoryPermissions()).thenReturn("755"); 52 when(backendCfg.getDBCacheSize()).thenReturn(0L); 53 when(backendCfg.getDBCachePercent()).thenReturn(20); 54 when(backendCfg.getDBNumCleanerThreads()).thenReturn(2); 55 when(backendCfg.getDBNumLockTables()).thenReturn(63);
|
| /forgerock/opendj-v3/opendj-server-legacy/src/test/java/org/opends/server/backends/pluggable/pdb/ |
| H A D | PDBTestCase.java | 29 import static org.mockito.Mockito.when; 53 when(backendCfg.getBackendId()).thenReturn("PDBTestCase"); 54 when(backendCfg.getDBDirectory()).thenReturn("PDBTestCase"); 55 when(backendCfg.getDBDirectoryPermissions()).thenReturn("755"); 56 when(backendCfg.getDBCacheSize()).thenReturn(0L); 57 when(backendCfg.getDBCachePercent()).thenReturn(20);
|
| /forgerock/openam/openam-core/src/test/java/org/forgerock/openam/session/service/access/persistence/caching/ |
| H A D | TimedOutSessionFilterStepTest.java | 19 import static org.mockito.Mockito.when; 61 when(timedOutSession.isTimedOut()).thenReturn(true); 62 when(timedOutSession.willExpire()).thenReturn(true); 63 when(timedOutSession.getTimeLeft()).thenReturn(0L); 64 when(timedOutSession.getMaxIdleTime()).thenReturn(1L); 65 when(timedOutSession.getIdleTime()).thenReturn(10L); 67 when(notTimedOutSession.isTimedOut()).thenReturn(false); 68 when(notTimedOutSession.willExpire()).thenReturn(false); 69 when(notTimedOutSession.getTimeLeft()).thenReturn(100000L); 70 when(notTimedOutSessio [all...] |
| /forgerock/openam/openam-core-rest/src/test/java/org/forgerock/openam/core/rest/sms/ |
| H A D | SmsRealmProviderTest.java | 24 import static org.mockito.Mockito.when; 83 when(mockRealmNormaliser.normalise(Mockito.anyString())).thenAnswer(new Answer<String>() { 90 when(updateContent.get(same(PATH_ATTRIBUTE_NAME))).thenReturn(pathAttributeJasonValue); 91 when(updateContent.get(same(REALM_NAME_ATTRIBUTE_NAME))).thenReturn(realmNameAttributeJasonValue); 92 when(mockUpdateRequest.getContent()).thenReturn(updateContent); 94 when(realmName.isNotNull()).thenReturn(true); 95 when(realmName.asString()).thenReturn("realm"); 97 when(parentPath.isNotNull()).thenReturn(true); 98 when(parentPath.asString()).thenReturn("parent"); 100 when(activ [all...] |
| H A D | SmsResourceProviderTest.java | 24 import static org.mockito.Mockito.when; 113 when(localeContext.getLocale()).thenReturn(local); 114 when(mockContext.asContext(LocaleContext.class)).thenReturn(localeContext); 120 when(mockContext.getParent()).thenReturn(new RootContext()); 121 when(mockContext.containsContext(RealmContext.class)).thenReturn(true); 122 when(mockContext.asContext(RealmContext.class)).thenReturn(mockRealmContext); 123 when(mockRealmContext.getRealm()).thenReturn(realm); 124 when(mockServiceConfigManager.getOrganizationConfig("/" + RESOLVED_REALM, null)).thenReturn(mockServiceConfig); 158 when(serviceSchema.getI18NFileName()).thenReturn("org/forgerock/openam/core/rest/sms/SmsResourceProviderTest"); 159 when(serviceSchem [all...] |
| /forgerock/openam-v13/openam-uma/src/test/java/org/forgerock/openam/uma/ |
| H A D | UmaTokenStoreTest.java | 67 when(rptAdapter.toToken(rptCapture.capture())).thenAnswer(new Answer<Token>() { 73 when(providerSettings.getRPTLifetime()).thenReturn(1000L); 87 when(rptAdapter.toToken(rptCapture.capture())).thenAnswer(new Answer<Token>() { 93 when(providerSettings.getRPTLifetime()).thenReturn(1000L); 95 doThrow(CoreTokenException.class).when(cts).create(RPT_TOKEN); 105 when(permissionTicketAdapter.toToken(ticketCapture.capture())).thenAnswer(new Answer<Token>() { 111 when(providerSettings.getPermissionTicketLifetime()).thenReturn(1000L); 127 when(permissionTicketAdapter.toToken(ticketCapture.capture())).thenAnswer(new Answer<Token>() { 133 when(providerSettings.getPermissionTicketLifetime()).thenReturn(1000L); 135 doThrow(CoreTokenException.class).when(ct [all...] |
| /forgerock/openam/openam-uma/src/test/java/org/forgerock/openam/uma/ |
| H A D | UmaTokenStoreTest.java | 67 when(rptAdapter.toToken(rptCapture.capture())).thenAnswer(new Answer<Token>() { 73 when(providerSettings.getRPTLifetime()).thenReturn(1000L); 87 when(rptAdapter.toToken(rptCapture.capture())).thenAnswer(new Answer<Token>() { 93 when(providerSettings.getRPTLifetime()).thenReturn(1000L); 95 doThrow(CoreTokenException.class).when(cts).create(RPT_TOKEN); 105 when(permissionTicketAdapter.toToken(ticketCapture.capture())).thenAnswer(new Answer<Token>() { 111 when(providerSettings.getPermissionTicketLifetime()).thenReturn(1000L); 127 when(permissionTicketAdapter.toToken(ticketCapture.capture())).thenAnswer(new Answer<Token>() { 133 when(providerSettings.getPermissionTicketLifetime()).thenReturn(1000L); 135 doThrow(CoreTokenException.class).when(ct [all...] |
| /forgerock/openam-v13/openam-radius/openam-radius-server/src/test/java/org/forgerock/openam/radius/server/spi/handlers/ |
| H A D | OpenAMAuthHandlerTest.java | 83 when(authContext.getStatus()).thenReturn(AuthContext.Status.SUCCESS); 84 when(status.toString()).thenReturn("success"); 85 when(authContext.hasMoreRequirements()).thenReturn(true, false); 86 when(authContext.getRequirements(true)).thenReturn(callbacks); 91 when(holder.getCacheKey()).thenReturn(cacheKey); 92 when(holder.getAuthContext()).thenReturn(authContext); 93 when(holder.getAuthPhase()).thenReturn(AuthPhase.STARTING, AuthPhase.GATHERING_INPUT, AuthPhase.FINALIZING); 94 when(holder.getCallbacks()).thenReturn(callbacks, callbacks, (Callback[]) null); 95 when(holder.getIdxOfCurrentCallback()).thenReturn(1, 2); 98 when(ctxHolderCach [all...] |
| /forgerock/openam/openam-radius/openam-radius-server/src/test/java/org/forgerock/openam/radius/server/spi/handlers/ |
| H A D | OpenAMAuthHandlerTest.java | 83 when(authContext.getStatus()).thenReturn(AuthContext.Status.SUCCESS); 84 when(status.toString()).thenReturn("success"); 85 when(authContext.hasMoreRequirements()).thenReturn(true, false); 86 when(authContext.getRequirements(true)).thenReturn(callbacks); 91 when(holder.getCacheKey()).thenReturn(cacheKey); 92 when(holder.getAuthContext()).thenReturn(authContext); 93 when(holder.getAuthPhase()).thenReturn(AuthPhase.STARTING, AuthPhase.GATHERING_INPUT, AuthPhase.FINALIZING); 94 when(holder.getCallbacks()).thenReturn(callbacks, callbacks, (Callback[]) null); 95 when(holder.getIdxOfCurrentCallback()).thenReturn(1, 2); 98 when(ctxHolderCach [all...] |
| /forgerock/openam/openam-radius/openam-radius-server/src/test/java/org/forgerock/openam/radius/server/ |
| H A D | RadiusRequestHandlerTest.java | 42 import static org.mockito.Mockito.when; 56 * Test that when run is called with an AcceptAllHandler that the resultant packet sent via the request 59 * @throws InterruptedException - when an interrupt occurs. 60 * @throws RadiusProcessingException - when something goes wrong processing a RADIUS packet. 72 when(reqCtx.getClientConfig()).thenReturn(clientConfig); 73 when(reqCtx.getSource()).thenReturn(socketAddress); 74 when(clientConfig.getName()).thenReturn("TestConfig"); 80 when(accessRequestHandlerFactory.getAccessRequestHandler(reqCtx)).thenReturn(new AcceptAllHandler()); 83 //when 91 * Test that when ru [all...] |
| /forgerock/opendj2/tests/unit-tests-testng/src/server/org/opends/server/loggers/ |
| H A D | AbstractTextAccessLogPublisherTest.java | 32 import static org.mockito.Mockito.when; 133 // There is just one exception: when the operation is a synchronization 165 when(operation.isSynchronizationOperation()) 167 when(operation.isInnerOperation()).thenReturn(isInternalOp); 191 when(cfg.getRequestTargetDNEqualTo()).thenReturn(setOf("dc=com")); 194 when(operation.getBaseDN()).thenReturn(dn("dc=com"), dn("dc=org")); 205 when(cfg.getRequestTargetDNNotEqualTo()).thenReturn(setOf("dc=com")); 208 when(operation.getBaseDN()).thenReturn(dn("dc=com"), dn("dc=org")); 219 when(cfg.getResponseEtimeGreaterThan()).thenReturn(100); 222 when(operatio [all...] |
| /forgerock/opendj2-hg/tests/unit-tests-testng/src/server/org/opends/server/loggers/ |
| H A D | AbstractTextAccessLogPublisherTest.java | 32 import static org.mockito.Mockito.when; 133 // There is just one exception: when the operation is a synchronization 165 when(operation.isSynchronizationOperation()) 167 when(operation.isInnerOperation()).thenReturn(isInternalOp); 191 when(cfg.getRequestTargetDNEqualTo()).thenReturn(setOf("dc=com")); 194 when(operation.getBaseDN()).thenReturn(dn("dc=com"), dn("dc=org")); 205 when(cfg.getRequestTargetDNNotEqualTo()).thenReturn(setOf("dc=com")); 208 when(operation.getBaseDN()).thenReturn(dn("dc=com"), dn("dc=org")); 219 when(cfg.getResponseEtimeGreaterThan()).thenReturn(100); 222 when(operatio [all...] |
| /forgerock/opendj-v3/opendj-server-legacy/src/test/java/org/opends/server/loggers/ |
| H A D | AbstractTextAccessLogPublisherTest.java | 127 // There is just one exception: when the operation is a synchronization 159 when(operation.isSynchronizationOperation()) 161 when(operation.isInnerOperation()).thenReturn(isInternalOp); 185 when(cfg.getRequestTargetDNEqualTo()).thenReturn(newTreeSet("dc=com")); 188 when(operation.getBaseDN()).thenReturn(dn("dc=com"), dn("dc=org")); 199 when(cfg.getRequestTargetDNNotEqualTo()).thenReturn(newTreeSet("dc=com")); 202 when(operation.getBaseDN()).thenReturn(dn("dc=com"), dn("dc=org")); 213 when(cfg.getResponseEtimeGreaterThan()).thenReturn(100); 216 when(operation.getProcessingTime()).thenReturn(50L, 150L); 227 when(cf [all...] |
| /forgerock/openidm-v4/openidm-core/src/test/java/org/forgerock/openidm/sync/impl/ |
| H A D | LinkTest.java | 23 import static org.mockito.Mockito.when; 100 when(synchronizationServiceMock.getConnectionFactory()).thenReturn(connectionFactorymock); 101 when(connectionFactorymock.getConnection()).thenReturn(connectionMock); 108 when(linkTypeMock.normalizeSourceId(anyString())).thenReturn("sourceId"); 109 when(linkTypeMock.normalizeTargetId(anyString())).thenReturn("targetId"); 110 when(linkTypeMock.getName()).thenReturn("linkType"); 111 when(linkTypeMock.useReverse()).thenReturn(true); 113 when(objectMapping.getService().getContext()).thenReturn(new RootContext()); 114 when(connectionMock.create(any(Context.class), any(CreateRequest.class))) 133 when(synchronizationServiceMoc [all...] |
| /forgerock/openam/openam-oauth2/src/test/java/org/forgerock/openam/oauth2/validation/ |
| H A D | ConfirmationKeyValidatorTest.java | 20 import static org.mockito.Mockito.when; 53 when(utils.getConfirmationKey(request)).thenReturn(null); 59 when(utils.getConfirmationKey(request)).thenThrow(new JsonException()); 65 when(utils.getConfirmationKey(request)).thenReturn(json(object(field("some-field", "some-value")))); 71 when(utils.getConfirmationKey(request)).thenReturn(json(object(field("jwk", object()))));
|
| /forgerock/openam-v13/openam-core/src/test/java/org/forgerock/openam/sm/datalayer/store/ |
| H A D | TokenDataStoreTest.java | 65 when(adapter.toToken(anyObject())).thenReturn(token); 66 when(taskFactory.create(any(Token.class), any(ResultHandler.class))).thenAnswer(new Answer<Object>() { 87 when(adapter.toToken(anyObject())).thenReturn(token); 88 when(taskFactory.create(any(Token.class), any(ResultHandler.class))).thenAnswer(new Answer<Object>() { 107 when(adapter.toToken(anyObject())).thenReturn(token); 108 when(taskFactory.create(any(Token.class), any(ResultHandler.class))).thenReturn(task); 109 doThrow(DataLayerException.class).when(taskExecutor).execute("123", task); 123 when(adapter.fromToken(token)).thenReturn(returned); 124 when(taskFactory.read(anyString(), any(ResultHandler.class))).thenAnswer(new Answer<Task>() { 147 when(adapte [all...] |
| /forgerock/openam-v13/openam-oauth2/src/test/java/org/forgerock/openam/oauth2/ |
| H A D | OpenAMScopeValidatorTest.java | 57 when(factory.get(request)).thenReturn(providerSettings); 61 when(identityManager.getResourceOwnerIdentity(anyString(), anyString())).thenReturn(identity); 69 when(client.getAllowedScopes()).thenReturn(asSet("a", "b", "c")); 81 when(client.getAllowedScopes()).thenReturn(asSet("a", "b", "c")); 93 when(client.getAllowedScopes()).thenReturn(asSet("x", "y", "z")); 105 when(client.getDefaultScopes()).thenReturn(asSet("a", "b")); 117 when(client.getAllowedScopes()).thenReturn(asSet("a", "b", "c")); 126 when(client.getAllowedScopes()).thenReturn(asSet("a", "b", "c")); 136 when(accessToken.getScope()).thenReturn(Collections.<String>emptySet()); 138 // when [all...] |
| /forgerock/openam/openam-oauth2/src/test/java/org/forgerock/openam/oauth2/ |
| H A D | OpenAMScopeValidatorTest.java | 55 when(factory.get(request)).thenReturn(providerSettings); 59 when(identityManager.getResourceOwnerIdentity(anyString(), anyString())).thenReturn(identity); 66 when(client.getAllowedScopes()).thenReturn(asSet("a", "b", "c")); 78 when(client.getAllowedScopes()).thenReturn(asSet("a", "b", "c")); 90 when(client.getAllowedScopes()).thenReturn(asSet("x", "y", "z")); 102 when(client.getDefaultScopes()).thenReturn(asSet("a", "b")); 114 when(client.getAllowedScopes()).thenReturn(asSet("a", "b", "c")); 123 when(client.getAllowedScopes()).thenReturn(asSet("a", "b", "c")); 133 when(accessToken.getScope()).thenReturn(Collections.<String>emptySet()); 135 // when [all...] |
| /forgerock/openam/openam-core/src/test/java/org/forgerock/openam/sm/datalayer/store/ |
| H A D | TokenDataStoreTest.java | 62 when(adapter.toToken(anyObject())).thenReturn(token); 77 when(adapter.toToken(anyObject())).thenReturn(token); 91 when(adapter.toToken(anyObject())).thenReturn(token); 92 when(taskFactory.create(any(Token.class), any(Options.class), any(ResultHandler.class))).thenReturn(task); 93 doThrow(DataLayerException.class).when(taskExecutor).execute("123", task); 106 when(adapter.fromToken(token)).thenReturn(returned); 123 when(adapter.fromToken(token)).thenReturn(returned); 135 when(adapter.fromToken(token)).thenReturn(returned); 147 when(adapter.fromToken(token)).thenReturn(returned); 149 doThrow(DataLayerException.class).when(taskExecuto [all...] |
| /forgerock/opendj2/ext/ant/bin/ |
| H A D | antenv.cmd | 33 when param='-lcp' then mode = 'l'
34 when param='-cp' | param='-classpath' then mode = 'c'
35 when abbrev('-opts', param, 4) then mode = 'o'
36 when abbrev('-args', param, 4) then mode = 'a'
39 when mode = 'a' then args = space(args param, 1)
40 when mode = 'c' then cp = space(cp param, 1)
41 when mode = 'l' then lcp = space(lcp param, 1)
42 when mode = 'o' then opts = space(opts param, 1)
|
| /forgerock/opendj-b2.6/ext/ant/bin/ |
| H A D | antenv.cmd | 33 when param='-lcp' then mode = 'l'
34 when param='-cp' | param='-classpath' then mode = 'c'
35 when abbrev('-opts', param, 4) then mode = 'o'
36 when abbrev('-args', param, 4) then mode = 'a'
39 when mode = 'a' then args = space(args param, 1)
40 when mode = 'c' then cp = space(cp param, 1)
41 when mode = 'l' then lcp = space(lcp param, 1)
42 when mode = 'o' then opts = space(opts param, 1)
|
| /forgerock/opendj2.6.2/ext/ant/bin/ |
| H A D | antenv.cmd | 33 when param='-lcp' then mode = 'l'
34 when param='-cp' | param='-classpath' then mode = 'c'
35 when abbrev('-opts', param, 4) then mode = 'o'
36 when abbrev('-args', param, 4) then mode = 'a'
39 when mode = 'a' then args = space(args param, 1)
40 when mode = 'c' then cp = space(cp param, 1)
41 when mode = 'l' then lcp = space(lcp param, 1)
42 when mode = 'o' then opts = space(opts param, 1)
|
| /forgerock/opendj2-hg/ext/ant/bin/ |
| H A D | antenv.cmd | 33 when param='-lcp' then mode = 'l'
34 when param='-cp' | param='-classpath' then mode = 'c'
35 when abbrev('-opts', param, 4) then mode = 'o'
36 when abbrev('-args', param, 4) then mode = 'a'
39 when mode = 'a' then args = space(args param, 1)
40 when mode = 'c' then cp = space(cp param, 1)
41 when mode = 'l' then lcp = space(lcp param, 1)
42 when mode = 'o' then opts = space(opts param, 1)
|
| /forgerock/openam-v13/openam-scripting/src/test/java/org/forgerock/openam/scripting/service/ |
| H A D | ScriptConfigurationServiceTest.java | 24 import static org.mockito.Mockito.when; 57 when(dataStoreFactory.create(any(Subject.class), anyString())).thenReturn(dataStore); 71 when(dataStore.containsUuid(anyString())).thenReturn(false); 72 when(dataStore.containsName(anyString())).thenReturn(false); 74 // when 98 when(dataStore.containsUuid(anyString())).thenReturn(false); 99 when(dataStore.containsName(anyString())).thenReturn(true); 101 // when 122 when(dataStore.containsUuid(anyString())).thenReturn(true); 123 when(dataStor [all...] |
| /forgerock/opendj-v3/opendj-server-legacy/ext/ant/bin/ |
| H A D | antenv.cmd | 33 when param='-lcp' then mode = 'l'
34 when param='-cp' | param='-classpath' then mode = 'c'
35 when abbrev('-opts', param, 4) then mode = 'o'
36 when abbrev('-args', param, 4) then mode = 'a'
39 when mode = 'a' then args = space(args param, 1)
40 when mode = 'c' then cp = space(cp param, 1)
41 when mode = 'l' then lcp = space(lcp param, 1)
42 when mode = 'o' then opts = space(opts param, 1)
|