public void ShouldGetLatestExerciseDate() { //Given var date = new DateTime(2018, 1, 6); _healthRepository.Setup(x => x.GetLatestExerciseDate()).Returns(date); //when var latestDate = _healthService.GetLatestExerciseDate(DateTime.MinValue); //then Assert.Equal(date, latestDate); }