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

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

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

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