public async Task GetAllProjectAsync() { await CreateUserAndMockingHttpContextToReturnAccessToken(); var responseProjects = Task.FromResult(_stringConstant.ProjectDetailsForAdminFromOauth); var requestUrl = _stringConstant.AllProjectUrl; _mockHttpClientService.Setup(x => x.GetAsync(_stringConstant.ProjectUrl, requestUrl, _stringConstant.AccessTokenForTest, _stringConstant.Bearer)).Returns(responseProjects); var result = await _mailSettingRepository.GetAllProjectAsync(); Assert.True(result.Any()); }
public async Task <IHttpActionResult> GetAllProjectAsync() { return(Ok(await _mailSettingRepository.GetAllProjectAsync())); }