コード例 #1
0
 public async Task RequestUserProfileService()
 {
     await _googleAuthenticator.LoginGoogle(_testUsername);
     _googlePlusService = new GooglePlusService(_googleAuthenticator.GetCurrentCredentials());
     _googlePlusService.CreateService();
     Assert.IsNotNull(_googlePlusService.GetUserProfile());
 }
コード例 #2
0
 private async Task SetupTestEnvironment()
 {
     await _googleAuthenticator.LoginGoogle(_testUsername);
     _user = _googleAuthenticator.GetCurrentCredentials();
     _googlePlusService = new GooglePlusService(_user);
     _googlePlusService.CreateService();
     _userProfile = _googlePlusService.GetUserProfile();
 }
コード例 #3
0
 /// <summary>
 /// Get current user his/her profile
 /// </summary>
 /// <returns>UserProfile in a GoogleProfileModel</returns>
 public GoogleProfileModel GetCurrentUser()
 {
     var googlePlusService = new GooglePlusService(_credential);
     googlePlusService.CreateService();
     return googlePlusService.GetUserProfile();
 }