public async Task AddAsync_HappyPath() { // Arrange var matchRequestDto = testRequestDtoMatches.Generate(); var matchModelResult = mapper.Map <MatchModel>(matchRequestDto); var id = Guid.NewGuid(); var utcNow = DateTime.UtcNow; matchModelResult.ID = id; matchModelResult.DateCreatedUTC = utcNow; matchModelResult.DateModifiedUTC = utcNow; mockMatchService.Setup(service => service.AddAsync(It.IsAny <MatchModel>())).ReturnsAsync(matchModelResult); // Act var response = await matchController.AddAsync(matchRequestDto); // Assert Assert.True(AreEqualRequestAndResponseDto(matchRequestDto, response)); Assert.Equal(id, response.ID); Assert.Equal(utcNow, response.DateCreatedUTC); Assert.Equal(utcNow, response.DateModifiedUTC); mockMatchService.Verify(service => service.AddAsync(It.IsAny <MatchModel>()), Times.Once); }