AuthPresenter implements AuthContract.Presenter { @Override public void handleGoogleSignInResult(boolean signedIn) { if (signedIn) { mView.showFireBaseAuthUi(); } else { mView.setProgressIndicator(false); mView.showSignInButton(true); mView.showFailMessage(); } } @Inject  AuthPresenter(AuthContract.View view); @Override void googleSignIn(); @Override void handleGoogleSignInResult(boolean signedIn); @Override void handleFirebaseSignInResult(boolean signedIn);  }
@Test public void googleSignInFails_ShowsFailMsg() { mAuthPresenter.handleGoogleSignInResult(false); verify(mView).showFailMessage(); }
@Test public void googleSignInFails_ShowsSignInButton() { mAuthPresenter.handleGoogleSignInResult(false); verify(mView).showSignInButton(true); }
@Test public void googleSignInFails_HidesProgressBar() { mAuthPresenter.handleGoogleSignInResult(false); verify(mView).setProgressIndicator(false); }
@Test public void googleSignInSucceeds_TriesToSignInWithFirebaseAuth() { mAuthPresenter.handleGoogleSignInResult(true); verify(mView).showFireBaseAuthUi(); }