public async Task GetAuthenticatedUser_ReturnsFromUserQueryExecutorAsync()
        {
            // Arrange
            var controller    = CreateUserController();
            var parameters    = new GetAuthenticatedUserParameters();
            var request       = A.Fake <ITwitterRequest>();
            var twitterResult = A.Fake <ITwitterResult <IUserDTO> >();

            A.CallTo(() => _fakeUserQueryExecutor.GetAuthenticatedUserAsync(parameters, request)).Returns(twitterResult);

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

            // Assert
            Assert.Equal(result, twitterResult);
        }
Beispiel #2
0
 public Task <ITwitterResult <IUserDTO> > GetAuthenticatedUserAsync(IGetAuthenticatedUserParameters parameters, ITwitterRequest request)
 {
     return(_userQueryExecutor.GetAuthenticatedUserAsync(parameters, request));
 }