public void Set_complete_by_date_should_update_db() { // Given const int candidateId = 1; const int progressId = 94323; var newCompleteByDate = new DateTime(2020, 7, 29); using (new TransactionScope()) { // When courseDataService.SetCompleteByDate(progressId, candidateId, newCompleteByDate); var modifiedCourse = courseDataService.GetCurrentCourses(candidateId).ToList() .First(c => c.ProgressID == progressId); // Then modifiedCourse.CompleteByDate.Should().Be(newCompleteByDate); } }