public async Task RetrieveNoticeBoardThreads_ReturnListOfNoticeBoardThreads() { var requestDto = new RetrieveNoticeBoardThreadsRequest(); var responseDto = new RetrieveNoticeBoardThreadsResponse(_mockedListDto); _noticeBoardRepoMock.Setup(n => n.RetrieveAllNoticeBoardThreads(requestDto)).ReturnsAsync(_mockedListDto); var noticeBoardThreadList = await _sut.RetrieveNoticeBoardThreads(requestDto); Assert.Equal(responseDto.NoticeBoard, noticeBoardThreadList.NoticeBoard); }
public async Task <RetrieveNoticeBoardThreadsResponse> RetrieveNoticeBoardThreads( RetrieveNoticeBoardThreadsRequest request) { RetrieveNoticeBoardThreadsResponse response = new RetrieveNoticeBoardThreadsResponse( await _noticeBoardRepository.RetrieveAllNoticeBoardThreads(request)); if (request == null) { throw new InvalidNoticeBoardRequestException("Invalid RetrieveNoticeBoardThreadsRequest object"); } return(response); }