public async Task GetTweet_ReturnsQueryExecutorResult() { // Arrange var controller = CreateTweetController(); var parameters = new GetTweetParameters(42); var request = A.Fake <ITwitterRequest>(); var expectedResult = A.Fake <ITwitterResult <ITweetDTO> >(); A.CallTo(() => _fakeTweetQueryExecutor.GetTweet(parameters, request)).Returns(expectedResult); // Act var result = await controller.GetTweet(parameters, request); // Assert Assert.Equal(result, expectedResult); }
public Task <ITwitterResult <ITweetDTO> > GetTweet(IGetTweetParameters parameters, ITwitterRequest request) { return(_tweetQueryExecutor.GetTweet(parameters, request)); }