Пример #1
0
        public async Task InvalidateAccessToken_ReturnsFromQueryExecutor()
        {
            // Arrange
            var controller     = CreateAuthController();
            var request        = A.Fake <ITwitterRequest>();
            var expectedResult = A.Fake <ITwitterResult <InvalidateTokenResponse> >();
            var parameters     = new InvalidateAccessTokenParameters();

            A.CallTo(() => _fakeAuthQueryExecutor.InvalidateAccessToken(parameters, request)).Returns(expectedResult);

            // Act
            var result = await controller.InvalidateAccessToken(parameters, request);

            // Assert
            Assert.Equal(result, expectedResult);
        }
Пример #2
0
 public Task <ITwitterResult <InvalidateTokenResponse> > InvalidateAccessToken(IInvalidateAccessTokenParameters parameters, ITwitterRequest request)
 {
     return(_authQueryExecutor.InvalidateAccessToken(parameters, request));
 }