Java 类com.google.firebase.auth.AdditionalUserInfo 实例源码

项目:digits-migration-helper-android    文件:AuthMigratorTest.java   
@Before
public void setUp() throws Exception {
    MockitoAnnotations.initMocks(this);
    when(mockStorageHelpers.getApiKeyFromManifest(any(Context.class), eq(StorageHelpers
            .DIGITS_CONSUMER_KEY_KEY))).thenReturn(DIGITS_CONSUMER_KEY);
    when(mockStorageHelpers.getApiKeyFromManifest(any(Context.class), eq(StorageHelpers
            .DIGITS_CONSUMER_SECRET_KEY))).thenReturn(DIGITS_CONSUMER_SECRET);
    when(mockStorageHelpers.getApiKeyFromManifest(any(Context.class), eq(StorageHelpers
            .FABRIC_API_KEY_KEY))).thenReturn(FABRIC_API_KEY);
    authResult = new AuthResult() {
        @Override
        public FirebaseUser getUser() {
            return mockFirebaseUser;
        }

        @Override
        public AdditionalUserInfo getAdditionalUserInfo() {
            return null;
        }
    };

    authResultTask = Tasks.forResult(authResult);
}
项目:FireBaseTest    文件:FakeAuthTask.java   
/**
 * Pretends this task is failing after a certain period.
 */
private void fakeSuccessAfterDelay(OnSuccessListener<? super AuthResult> onSuccessListener) {
    new Handler().postDelayed(() -> onSuccessListener.onSuccess(new AuthResult() {
        @Override
        public FirebaseUser getUser() {
            return null;
        }

        @Override
        public AdditionalUserInfo getAdditionalUserInfo() {
            return null;
        }
    }), 200);
}
项目:FirebaseUI-Android    文件:FakeAuthResult.java   
@Override
public AdditionalUserInfo getAdditionalUserInfo() {
    return null;
}