public async Task GetMatchHistoryForUser_ShouldBeDoneSuccessfully() { // Arrange var datePlayed = DateTime.Now; var latestMatches = new List <MatchHistoryView>() { new MatchHistoryView() { Id = 1, DatePlayed = datePlayed, } }; _unitOfWorkMock.Setup(x => x.Matchdays.GetMatchHistoryForUser(It.IsAny <int>())) .ReturnsAsync(latestMatches); // Act var result = await _sut.GetMatchHistoryForUser(It.IsAny <int>()); // Assert var firstMatch = result.FirstOrDefault(); Assert.NotNull(firstMatch); Assert.Equal(datePlayed, firstMatch.DatePlayed); Assert.Equal(1, firstMatch.Id); }