Пример #1
0
        public async Task GetTweet_ReturnsQueryExecutorResultAsync()
        {
            // Arrange
            var controller     = CreateTweetController();
            var parameters     = new GetTweetParameters(42);
            var request        = A.Fake <ITwitterRequest>();
            var expectedResult = A.Fake <ITwitterResult <ITweetDTO> >();

            A.CallTo(() => _fakeTweetQueryExecutor.GetTweetAsync(parameters, request)).Returns(expectedResult);

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

            // Assert
            Assert.Equal(result, expectedResult);
        }
Пример #2
0
 public Task <ITwitterResult <ITweetDTO> > GetTweetAsync(IGetTweetParameters parameters, ITwitterRequest request)
 {
     return(_tweetQueryExecutor.GetTweetAsync(parameters, request));
 }