public void GetDepartures_WithoutData_ShouldReturnEmptyList() { // Arrange _departureRepository.Setup(r => r.List()).Returns(new List <DepartureEntity>()); var entryService = new DepartureService(_departureRepository.Object, _entryRepository.Object, _rateService.Object, _cellService.Object); // Act var result = entryService.GetDepartures(); // Assert Assert.IsTrue(result.Count() <= 0); }
public void GetDepartures_WithData_ShouldReturnListWithValues() { // Arrange _departureRepository.Setup(r => r.List()).Returns(new List <DepartureEntity> { new DepartureEntity { DepartureTime = DateTime.Now, Id = Guid.NewGuid().ToString() } }); var entryService = new DepartureService(_departureRepository.Object, _entryRepository.Object, _rateService.Object, _cellService.Object); // Act var result = entryService.GetDepartures(); // Assert Assert.IsTrue(result.Count() > 0); }