use of com.firebase.ui.auth.data.model.FlowParameters in project FirebaseUI-Android by firebase.
the class WelcomeBackPasswordHandlerTest method setUp.
@Before
public void setUp() {
TestHelper.initialize();
MockitoAnnotations.initMocks(this);
mHandler = new WelcomeBackPasswordHandler((Application) ApplicationProvider.getApplicationContext());
FlowParameters testParams = TestHelper.getFlowParameters(Collections.singletonList(EmailAuthProvider.PROVIDER_ID));
mHandler.initializeForTesting(testParams, mMockAuth, mMockCredentials);
}
use of com.firebase.ui.auth.data.model.FlowParameters in project FirebaseUI-Android by firebase.
the class AuthUITest method testCreatingStartIntentWithDefaultProvider.
@Test
public void testCreatingStartIntentWithDefaultProvider() {
FlowParameters flowParameters = mAuthUi.createSignInIntentBuilder().setAvailableProviders(Arrays.asList(new IdpConfig.EmailBuilder().build(), new IdpConfig.GoogleBuilder().build(), new IdpConfig.FacebookBuilder().build())).setDefaultProvider(new IdpConfig.FacebookBuilder().build()).build().getParcelableExtra(ExtraConstants.FLOW_PARAMS);
assertEquals(new IdpConfig.FacebookBuilder().build(), flowParameters.defaultProvider);
assertFalse(flowParameters.shouldShowProviderChoice());
assertEquals(new IdpConfig.FacebookBuilder().build(), flowParameters.getDefaultOrFirstProvider());
}
use of com.firebase.ui.auth.data.model.FlowParameters in project FirebaseUI-Android by firebase.
the class LinkingSocialProviderResponseHandlerTest method setupAnonymousUpgrade.
private void setupAnonymousUpgrade() {
FlowParameters testParams = TestHelper.getFlowParameters(Collections.singletonList(GoogleAuthProvider.PROVIDER_ID), true);
mHandler.initializeForTesting(testParams, mMockAuth, null);
when(mMockAuth.getCurrentUser()).thenReturn(mMockUser);
when(mMockUser.isAnonymous()).thenReturn(true);
AuthOperationManager.getInstance().mScratchAuth = mScratchMockAuth;
}
use of com.firebase.ui.auth.data.model.FlowParameters in project FirebaseUI-Android by firebase.
the class RecoverPasswordHandlerTest method setUp.
@Before
public void setUp() {
TestHelper.initialize();
MockitoAnnotations.initMocks(this);
mHandler = new RecoverPasswordHandler((Application) ApplicationProvider.getApplicationContext());
FlowParameters testParams = TestHelper.getFlowParameters(Collections.singletonList(EmailAuthProvider.PROVIDER_ID));
mHandler.initializeForTesting(testParams, mMockAuth, null);
mPasswordResetSettings = ActionCodeSettings.newBuilder().setAndroidPackageName("com.firebase.uidemo", true, null).setHandleCodeInApp(true).setUrl("https://google.com").build();
}
use of com.firebase.ui.auth.data.model.FlowParameters in project FirebaseUI-Android by firebase.
the class SocialProviderResponseHandlerTest method setUp.
@Before
public void setUp() {
TestHelper.initialize();
MockitoAnnotations.initMocks(this);
mHandler = new SocialProviderResponseHandler((Application) ApplicationProvider.getApplicationContext());
FlowParameters testParams = TestHelper.getFlowParameters(AuthUI.SUPPORTED_PROVIDERS);
mHandler.initializeForTesting(testParams, mMockAuth, null);
}
Aggregations