use of com.firebase.ui.auth.util.data.EmailLinkParser in project FirebaseUI-Android by firebase.
the class EmailLinkParserTest method testGetters_encodedLink.
@Test
public void testGetters_encodedLink() {
EmailLinkParser parser = new EmailLinkParser(ENCODED_EMAIL_LINK);
assertThat(parser.getOobCode()).isEqualTo(OOB_CODE);
assertThat(parser.getSessionId()).isEqualTo(SESSION_ID);
assertThat(parser.getAnonymousUserId()).isEqualTo(ANONYMOUS_USER_ID);
assertThat(parser.getProviderId()).isEqualTo(PROVIDER_ID);
assertThat(parser.getForceSameDeviceBit()).isEqualTo(FORCE_SAME_DEVICE);
}
use of com.firebase.ui.auth.util.data.EmailLinkParser in project FirebaseUI-Android by firebase.
the class ContinueUrlBuilderTest method testAppendParams_decodedLink_expectSuccess.
@Test
public void testAppendParams_decodedLink_expectSuccess() {
String continueUrlBuilder = new ContinueUrlBuilder(DECODED_EMAIL_LINK).appendSessionId(SESSION_ID).appendAnonymousUserId(ANONYMOUS_USER_ID).appendProviderId(PROVIDER_ID).appendForceSameDeviceBit(FORCE_SAME_DEVICE).build();
EmailLinkParser parser = new EmailLinkParser(continueUrlBuilder);
assertThat(parser.getSessionId()).isEqualTo(SESSION_ID);
assertThat(parser.getAnonymousUserId()).isEqualTo(ANONYMOUS_USER_ID);
assertThat(parser.getProviderId()).isEqualTo(PROVIDER_ID);
assertThat(parser.getForceSameDeviceBit()).isEqualTo(FORCE_SAME_DEVICE);
}
use of com.firebase.ui.auth.util.data.EmailLinkParser in project FirebaseUI-Android by firebase.
the class EmailLinkParserTest method testGetters_noContinueUrlParams.
@Test
public void testGetters_noContinueUrlParams() {
String encodedLink = ENCODED_EMAIL_LINK.substring(0, ENCODED_EMAIL_LINK.length() - CONTINUE_URL.length());
EmailLinkParser parser = new EmailLinkParser(encodedLink);
assertThat(parser.getOobCode()).isEqualTo(OOB_CODE);
assertThat(parser.getSessionId()).isNull();
assertThat(parser.getAnonymousUserId()).isNull();
assertThat(parser.getProviderId()).isNull();
assertThat(parser.getForceSameDeviceBit()).isFalse();
}
Aggregations