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

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

            A.CallTo(() => _fakeUserQueryExecutor.BlockUserAsync(blockUserParameters, request)).Returns(expectedResult);

            // Act
            var result = await controller.BlockUserAsync(blockUserParameters, request);

            // Assert
            Assert.Equal(result, expectedResult);
        }
Example #2
0
 // BLOCK
 public Task <ITwitterResult <IUserDTO> > BlockUserAsync(IBlockUserParameters parameters, ITwitterRequest request)
 {
     return(_userQueryExecutor.BlockUserAsync(parameters, request));
 }