private async Task<UserCredential> GoogleSignin(string username)
 {
     var googleAuthenticator = new AuthenticationGoogle();
     await googleAuthenticator.LoginGoogle(username);
     var currentUserCredentials = googleAuthenticator.GetCurrentCredentials();
     _googleApiClient = new GoogleApiClient(currentUserCredentials);
     return currentUserCredentials;
 }
 public async Task GetUserBirthdayTest()
 {
     var googleAuthenticator = new AuthenticationGoogle();
     await googleAuthenticator.LoginGoogle(_testUsername);
     var googleApiClient = new GoogleApiClient(googleAuthenticator.GetCurrentCredentials());
     var googleCorrelatorBot = new GoogleDataCorrelator(googleApiClient.GetEventsUser(), googleApiClient.GetGmailsUser(), googleApiClient.GetCurrentUser());
     var correlation = googleCorrelatorBot.GetUserBirthday();
     Assert.IsNotNull(correlation);
 }
 public async Task StartBotClientTest()
 {
     var googleAuthenticator = new AuthenticationGoogle();
     await googleAuthenticator.LoginGoogle(_testUsername);
     var googleApiClient = new GoogleApiClient(googleAuthenticator.GetCurrentCredentials());
     var bot = BotClient.GetBotClientInstance();
     Assert.IsNotNull(bot.StartBotClient(googleApiClient.GetEventsUser(), googleApiClient.GetGmailsUser(),
         googleApiClient.GetCurrentUser()));
 }
 private async Task<BotClient> SetupBot()
 {
     var googleAuthenticator = new AuthenticationGoogle();
     await googleAuthenticator.LoginGoogle(_testUsername);
     var googleApiClient = new GoogleApiClient(googleAuthenticator.GetCurrentCredentials());
     var bot = BotClient.GetBotClientInstance();
     bot.StartBotClient(googleApiClient.GetEventsUser(), googleApiClient.GetGmailsUser(),
         googleApiClient.GetCurrentUser());
     return bot;
 }
 public async Task TestGoogleApiClient()
 {
     var googleAuthenticator = new AuthenticationGoogle();
     await googleAuthenticator.LoginGoogle(_testUsername);
     var googleApiClient = new GoogleApiClient(googleAuthenticator.GetCurrentCredentials());
     var currentUser = googleApiClient.GetCurrentUser();
     Assert.IsNotNull(currentUser);
     Assert.IsNotNull(googleApiClient.GetEventsUser());
     Assert.IsNotNull(googleApiClient.GetGmailsUser());
     Assert.IsNotNull(GoogleApiClient.GetCurrentWeather(currentUser.location));
 }