@Test public void signIn() { GoogleAuth googleAuth = new GoogleAuth(); googleAuth.signIn().subscribe(); Mockito.verify(((AndroidApplication) Gdx.app), VerificationModeFactory.times(1)).startActivityForResult(Mockito.nullable(Intent.class), Mockito.anyInt()); PowerMockito.verifyStatic(GoogleSignIn.class, VerificationModeFactory.times(1)); GoogleSignIn.getClient((Activity) Mockito.refEq(Gdx.app), Mockito.any(GoogleSignInOptions.class)); }
@Override public Promise<GdxFirebaseUser> signIn() { return FuturePromise.when(new Consumer<FuturePromise<GdxFirebaseUser>>() { @Override public void accept(FuturePromise<GdxFirebaseUser> gdxFirebaseUserFuturePromise) { GoogleSignInOptions gso = GoogleSignInOptionsFactory.factory(); ((AndroidApplication) Gdx.app).addAndroidEventListener(new GoogleSignInListener(gdxFirebaseUserFuturePromise)); ((AndroidApplication) Gdx.app).startActivityForResult( GoogleSignIn.getClient((AndroidApplication) Gdx.app, gso).getSignInIntent(), Const.GOOGLE_SIGN_IN); } }); }
GoogleAuth implements GoogleAuthDistribution { @Override public Promise<GdxFirebaseUser> signIn() { return FuturePromise.when(new Consumer<FuturePromise<GdxFirebaseUser>>() { @Override public void accept(FuturePromise<GdxFirebaseUser> gdxFirebaseUserFuturePromise) { GoogleSignInOptions gso = GoogleSignInOptionsFactory.factory(); ((AndroidApplication) Gdx.app).addAndroidEventListener(new GoogleSignInListener(gdxFirebaseUserFuturePromise)); ((AndroidApplication) Gdx.app).startActivityForResult( GoogleSignIn.getClient((AndroidApplication) Gdx.app, gso).getSignInIntent(), Const.GOOGLE_SIGN_IN); } }); } }
GoogleAuth implements GoogleAuthDistribution { @Override public Promise<GdxFirebaseUser> signIn() { return FuturePromise.when(new Consumer<FuturePromise<GdxFirebaseUser>>() { @Override public void accept(FuturePromise<GdxFirebaseUser> gdxFirebaseUserFuturePromise) { GoogleSignInOptions gso = GoogleSignInOptionsFactory.factory(); ((AndroidApplication) Gdx.app).addAndroidEventListener(new GoogleSignInListener(gdxFirebaseUserFuturePromise)); ((AndroidApplication) Gdx.app).startActivityForResult( GoogleSignIn.getClient((AndroidApplication) Gdx.app, gso).getSignInIntent(), Const.GOOGLE_SIGN_IN); } }); }  }
GoogleAuth implements GoogleAuthDistribution { @Override public Promise<GdxFirebaseUser> signIn() { return FuturePromise.when(new Consumer<FuturePromise<GdxFirebaseUser>>() { @Override public void accept(FuturePromise<GdxFirebaseUser> gdxFirebaseUserFuturePromise) { GoogleSignInOptions gso = GoogleSignInOptionsFactory.factory(); ((AndroidApplication) Gdx.app).addAndroidEventListener(new GoogleSignInListener(gdxFirebaseUserFuturePromise)); ((AndroidApplication) Gdx.app).startActivityForResult( GoogleSignIn.getClient((AndroidApplication) Gdx.app, gso).getSignInIntent(), Const.GOOGLE_SIGN_IN); } }); }  @Override Promise<GdxFirebaseUser> signIn(); @Override Promise<Void> signOut(); @Override Promise<Void> revokeAccess(); }
GoogleAuth implements GoogleAuthDistribution { @Override public Promise<GdxFirebaseUser> signIn() { return FuturePromise.when(new Consumer<FuturePromise<GdxFirebaseUser>>() { @Override public void accept(FuturePromise<GdxFirebaseUser> gdxFirebaseUserFuturePromise) { GoogleSignInOptions gso = GoogleSignInOptionsFactory.factory(); ((AndroidApplication) Gdx.app).addAndroidEventListener(new GoogleSignInListener(gdxFirebaseUserFuturePromise)); ((AndroidApplication) Gdx.app).startActivityForResult( GoogleSignIn.getClient((AndroidApplication) Gdx.app, gso).getSignInIntent(), Const.GOOGLE_SIGN_IN); } }); }  @Override Promise<GdxFirebaseUser> signIn(); @Override Promise<Void> signOut(); @Override Promise<Void> revokeAccess();  }