Exemple #1
0
        public async Task DeletingNonexistentAirplaneSeatTypeReturnsNotFoundResult()
        {
            // Arrange
            int airplaneId = 200;
            int seatTypeId = 200;

            // Act
            ResultTypes deleteResult = await _airplaneService.DeleteAirplaneSeatTypeAsync(airplaneId, seatTypeId);

            // Assert
            Assert.AreEqual(ResultTypes.NotFound, deleteResult);
        }
Exemple #2
0
        public async Task <ActionResult> DeleteAirplaneSeatTypeAsync(int airplaneId, int seatTypeId)
        {
            ResultTypes deleteResult = await _airplaneService.DeleteAirplaneSeatTypeAsync(airplaneId, seatTypeId);

            if (deleteResult == ResultTypes.NotFound)
            {
                return(NotFound());
            }

            return(Ok());
        }