public void Should_Return_Token_When_Credentials_Are_Valid()
        {
            var tokenRequest = new TokenRequest
            {
                UserName = ConfigurationManager.AppSettings["PlaygroundUserName"],
                Password = ConfigurationManager.AppSettings["PlaygroundPassword"]
            };

            var response = _playgroundClient.GetToken(tokenRequest).Result;

            Assert.IsNotNull(response);
            Assert.IsNotNull(response.Token);
            Assert.IsNotEmpty(response.Token);
            _token = response.Token;
        }
Ejemplo n.º 2
0
 public async Task <TokenResponse> GetToken(TokenRequest tokenRequest)
 {
     return(await _playgroundClient.GetToken(tokenRequest));
 }
Ejemplo n.º 3
0
 public async Task <TokenResponse> Handle(TokenRequest request, CancellationToken cancellationToken)
 {
     return(await _playgroundClient.GetToken(request));
 }