public async Task Should_successfully_authenticate_query() { var response = await OpenIdClient.RequestTokenAsync(RequestFactory.CorrectPasswordAuthenticationRequest()); response.AccessToken.Should().NotBeNullOrWhiteSpace(); response.ExpiresInSeconds.Should().BeGreaterThan(0); }
private async Task ShouldFail(PasswordTokenRequest request) { Func <Task> action = () => OpenIdClient.RequestTokenAsync(request); var exception = (await action.Should().ThrowAsync <OpenIdException>()).Which; Console.WriteLine(exception); }