public async Task GetToken_InvalidConfiguration_ReturnsNone()
        {
            _aniListConfiguration.AuthorisationCode.Returns("InvalidCode");

            var result = await _token.GetToken(_jsonConnection, _aniListConfiguration, _resultContext);

            result.IsRight.Should().BeFalse();
        }
Beispiel #2
0
        public async Task GetToken_FailedRequest_ReturnsNone()
        {
            _jsonConnection.PostAsync <GetTokenRequest.TokenData>(null, null)
            .ReturnsForAnyArgs(new FailedRequest(HttpStatusCode.NotFound, "NotFound"));

            var result = await _token.GetToken(_jsonConnection, _aniListConfiguration, _resultContext);

            result.IsRight.Should().BeFalse();
        }