Example #1
0
        public void GetAllPassengers_ShouldReturnAllPassengers()
        {
            // Arrange
            var testPassengers = _mockPersonRepository.Object.GetAll().ToList();

            // Act
            var result = _passengersService.GetPassengers().ToList();

            // Assert
            Assert.AreEqual(testPassengers.Count, result.Count);
        }
Example #2
0
 public async Task <IActionResult> Get()
 {
     return(new OkObjectResult(await _passengersService.GetPassengers()));
 }
 public ActionResult <IEnumerable <Person> > GetPassengers([FromQuery] PassengerFilterModel filterModel)
 {
     return(Ok(_passengersService.GetPassengers(filterModel)));
 }