public void AttemptCreateGoogleClientWithInvalidClientSecret()
        {
            var serverDescription = this.membershipService.RetrieveAuthServerDescription();
            this.providerMock.Setup(c => c.GoogleClientId).Returns("abcdef");
            this.providerMock.Setup(s => s.GoogleClientSecret).Returns(string.Empty);
            var action = new CreateGoogleClientAction(serverDescription, this.providerMock.Object);
            action.Execute();

            this.WriteValidationContextRuleResults(action.ValidationContext);
            Assert.IsNull(action.Client);
            Assert.IsFalse(action.ValidationContext.IsValid);
        }
        public void CanCreateGoogleClient()
        {
            var serverDescription = this.membershipService.RetrieveAuthServerDescription();
            this.providerMock.Setup(c => c.GoogleClientId).Returns("abcdefghijklmnop");
            this.providerMock.Setup(s => s.GoogleClientSecret).Returns("qrstuvwxyz");
            var action = new CreateGoogleClientAction(serverDescription, this.providerMock.Object);
            action.Execute();

            this.WriteValidationContextRuleResults(action.ValidationContext);
            Assert.IsNotNull(action.Client);
        }
 /// <summary>
 ///     Creates the google client.
 /// </summary>
 /// <returns></returns>
 public override WebServerClient CreateGoogleClient(AuthorizationServerDescription authorizationServerDescription)
 {
     WebServerClient client = null;
     CreateGoogleClientAction action = new CreateGoogleClientAction(authorizationServerDescription, this);
     action.Execute();
     if (action.Result == ActionResult.Success)
     {
         client = action.Client;
     }
     return client;
 }