public async Task CreateBearerToken_ReturnsQueryExecutorResult() { // Arrange var controller = CreateAuthController(); var request = A.Fake <ITwitterRequest>(); var expectedResult = A.Fake <ITwitterResult <CreateTokenResponseDTO> >(); var parameters = A.Fake <ICreateBearerTokenParameters>(); A.CallTo(() => _fakeAuthQueryExecutor.CreateBearerToken(parameters, request)).Returns(expectedResult); // Act var result = await controller.CreateBearerToken(parameters, request); // Assert Assert.Equal(result, expectedResult); }
public Task <ITwitterResult <CreateTokenResponseDTO> > CreateBearerToken(ICreateBearerTokenParameters parameters, ITwitterRequest request) { return(_authQueryExecutor.CreateBearerToken(parameters, request)); }