public async void GiveQueryWhenBoardsDoesNotExistReturnEmptyBoardCollection() { // Arrange SetupQueryHandler(new List<BoardTaskEntity>()); var query = new SearchBoardTasksQuery(); // Act var boardTaskCollection = await handler.HandleAsync(query); // Assert Assert.NotNull(boardTaskCollection); }
public async void GiveQueryWhenBoardsDoesNotExistReturnEmptyBoardCollection() { // Arrange SetupQueryHandler(new List <BoardTaskEntity>()); var query = new SearchBoardTasksQuery(); // Act var boardTaskCollection = await handler.Handle(query, CancellationToken.None); // Assert Assert.NotNull(boardTaskCollection); }
public async void GivenQueryWhenBoardsExistReturnBoardCollectionContainingBoards() { // Arrange SetupQueryHandler(new List<BoardTaskEntity> { new BoardTaskEntity { BoardColumnEntity = new BoardColumnEntity { BoardEntity = new BoardEntity() } } }); mockMappingService.Setup(x => x.Map<BoardTask>(It.IsAny<BoardTaskEntity>())).Returns(new BoardTask()); var query = new SearchBoardTasksQuery(); // Act var boardTaskCollection = await handler.HandleAsync(query); // Assert Assert.NotNull(boardTaskCollection); }
public async void GivenQueryWhenBoardsExistReturnBoardCollectionContainingBoards() { // Arrange SetupQueryHandler(new List <BoardTaskEntity> { new BoardTaskEntity { BoardColumnEntity = new BoardColumnEntity { BoardEntity = new BoardEntity() } } }); mockMappingService.Setup(x => x.Map <BoardTask>(It.IsAny <BoardTaskEntity>())).Returns(new BoardTask()); var query = new SearchBoardTasksQuery(); // Act var boardTaskCollection = await handler.Handle(query, CancellationToken.None); // Assert Assert.NotNull(boardTaskCollection); }