Beispiel #1
0
 public FlightScheduleService(ILegRepository legRepository, IFlightScheduleRepository flightScheduleRepository,
                              IFlightCostRepository flightCostRepository)
 {
     _legRepository            = legRepository;
     _flightScheduleRepository = flightScheduleRepository;
     _flightCostRepository     = flightCostRepository;
 }
        public FlightScheduleTest()
        {
            _flightScheduleRepository = Substitute.For <IFlightScheduleRepository>();
            _mapper = Substitute.For <IMapper>();

            _flightScheduleService = new FlightScheduleService(_flightScheduleRepository, _mapper);

            _cancellationToken = new CancellationToken();
        }
Beispiel #3
0
        public UnitOfWork(
            IPassengerRepository passengerRepository,
            IFlightScheduleRepository flightScheduleRepository,
            IFlightRepository flightRepository
            )

        {
            _passengerRepository      = passengerRepository;
            _flightScheduleRepository = flightScheduleRepository;
            _flightRepository         = flightRepository;
        }
Beispiel #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="FlightScheduleService" /> class.
        /// </summary>
        /// <param name="flightScheduleRepository">The flight schedule repository.</param>
        /// <param name="unitOfWork">The unit of work.</param>
        /// <exception cref="System.ArgumentNullException">
        /// </exception>
        public FlightScheduleService(IFlightScheduleRepository flightScheduleRepository, IUnitOfWork unitOfWork)
        {
            if (flightScheduleRepository == null)
            {
                throw new ArgumentNullException(nameof(flightScheduleRepository));
            }

            if (unitOfWork == null)
            {
                throw new ArgumentNullException(nameof(unitOfWork));
            }

            _flightScheduleRepository = flightScheduleRepository;
            _unitOfWork = unitOfWork;
        }
 public FlightScheduleService(IFlightScheduleRepository flightScheduleRepository, IMapper mapper) : base(flightScheduleRepository, mapper)
 {
     _flightScheduleRepository = flightScheduleRepository;
     _mapper = mapper;
 }