public async Task FollowUser_ReturnsFromUserQueryExecutorAsync()
        {
            // Arrange
            var controller = CreateUserController();
            var userDTO    = A.Fake <IUserDTO>();

            var followUserParameters = new FollowUserParameters(userDTO);
            var request        = A.Fake <ITwitterRequest>();
            var expectedResult = A.Fake <ITwitterResult <IUserDTO> >();

            A.CallTo(() => _fakeUserQueryExecutor.FollowUserAsync(followUserParameters, request)).Returns(expectedResult);

            // Act
            var result = await controller.FollowUserAsync(followUserParameters, request);

            // Assert
            Assert.Equal(result, expectedResult);
        }
示例#2
0
 // FOLLOW/UNFOLLOW
 public Task <ITwitterResult <IUserDTO> > FollowUserAsync(IFollowUserParameters parameters, ITwitterRequest request)
 {
     return(_userQueryExecutor.FollowUserAsync(parameters, request));
 }