Search in sources :

Example 1 with GenericIdpAnonymousUpgradeLinkingHandler

use of com.firebase.ui.auth.data.remote.GenericIdpAnonymousUpgradeLinkingHandler in project FirebaseUI-Android by firebase.

the class GenericIdpAnonymousUpgradeLinkingHandlerTest method setUp.

@Before
public void setUp() {
    TestHelper.initialize();
    MockitoAnnotations.initMocks(this);
    FlowParameters testParams = TestHelper.getFlowParameters(Arrays.asList(MICROSOFT_PROVIDER, GoogleAuthProvider.PROVIDER_ID), /* enableAnonymousUpgrade= */
    true);
    mMockActivity = TestHelper.getHelperActivity(testParams);
    mHandler = spy(new GenericIdpAnonymousUpgradeLinkingHandler((Application) ApplicationProvider.getApplicationContext()));
    Map<String, String> customParams = new HashMap<>();
    customParams.put(CUSTOM_PARAMETER_KEY, CUSTOM_PARAMETER_VALUE);
    AuthUI.IdpConfig config = new AuthUI.IdpConfig.MicrosoftBuilder().setScopes(Arrays.asList(SCOPE)).setCustomParameters(customParams).build();
    mHandler.initializeForTesting(config);
    mHandler.getOperation().observeForever(mResponseObserver);
}
Also used : FlowParameters(com.firebase.ui.auth.data.model.FlowParameters) HashMap(java.util.HashMap) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) GenericIdpAnonymousUpgradeLinkingHandler(com.firebase.ui.auth.data.remote.GenericIdpAnonymousUpgradeLinkingHandler) AuthUI(com.firebase.ui.auth.AuthUI) Before(org.junit.Before)

Aggregations

AuthUI (com.firebase.ui.auth.AuthUI)1 FlowParameters (com.firebase.ui.auth.data.model.FlowParameters)1 GenericIdpAnonymousUpgradeLinkingHandler (com.firebase.ui.auth.data.remote.GenericIdpAnonymousUpgradeLinkingHandler)1 HashMap (java.util.HashMap)1 Before (org.junit.Before)1 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)1