コード例 #1
0
        public async Task CreateBearerToken_ReturnsQueryExecutorResultAsync()
        {
            // Arrange
            var controller     = CreateAuthController();
            var request        = A.Fake <ITwitterRequest>();
            var expectedResult = A.Fake <ITwitterResult <CreateTokenResponseDTO> >();
            var parameters     = A.Fake <ICreateBearerTokenParameters>();

            A.CallTo(() => _fakeAuthQueryExecutor.CreateBearerTokenAsync(parameters, request)).Returns(expectedResult);

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

            // Assert
            Assert.Equal(result, expectedResult);
        }
コード例 #2
0
 public Task <ITwitterResult <CreateTokenResponseDTO> > CreateBearerTokenAsync(ICreateBearerTokenParameters parameters, ITwitterRequest request)
 {
     return(_authQueryExecutor.CreateBearerTokenAsync(parameters, request));
 }