use of com.microsoft.identity.internal.testutils.mocks.MockSuccessAuthorizationResultMockedTests in project microsoft-authentication-library-common-for-android by AzureAD.
the class MockStrategyWithMockedHttpResponse method requestAuthorization.
/**
* Template method for executing an OAuth2 authorization request.
*
* @param request microsoft sts authorization request.
* @param authorizationStrategy authorization strategy.
* @return GenericAuthorizationResponse
*/
@Override
public Future<AuthorizationResult> requestAuthorization(final MicrosoftStsAuthorizationRequest request, final AuthorizationStrategy authorizationStrategy) {
final MockSuccessAuthorizationResultMockedTests authorizationResult = new MockSuccessAuthorizationResultMockedTests();
final ResultFuture<AuthorizationResult> future = new ResultFuture<>();
future.setResult(authorizationResult);
return future;
}
use of com.microsoft.identity.internal.testutils.mocks.MockSuccessAuthorizationResultMockedTests in project microsoft-authentication-library-common-for-android by AzureAD.
the class MockTestStrategy method requestAuthorization.
/**
* Template method for executing an OAuth2 authorization request.
*
* @param request microsoft sts authorization request.
* @param authorizationStrategy authorization strategy.
* @return GenericAuthorizationResponse
*/
@Override
public Future<AuthorizationResult> requestAuthorization(final MicrosoftStsAuthorizationRequest request, final AuthorizationStrategy authorizationStrategy) {
final MockSuccessAuthorizationResultMockedTests authorizationResult = new MockSuccessAuthorizationResultMockedTests();
final ResultFuture<AuthorizationResult> future = new ResultFuture<>();
future.setResult(authorizationResult);
return future;
}
Aggregations