示例#1
0
 public SchedulerController()
 {
     _destService   = new DestinationService();
     _userService   = new UserService();
     _regService    = new RegistrationService();
     _actypeService = new AircraftTypeService();
     _calService    = new CalendarService();
     //_userID = Convert.ToInt32( User.Identity.GetUserId() );
 }
        public void TestSetup()
        {
            _type = new DTO.AircraftType()
            {
                AircraftModel = "Tupolev Tu-134444", SeatsNumber = 80, Carrying = 47000
            };

            uow = new UnitOfWork(airportContext);
            var mapper = GetAutoMapperConfig().CreateMapper();

            _aircraftTypeService = new AircraftTypeService(uow, mapper);
        }
        public void TestSetup()
        {
            _aircraftTypeId = 1;
            _type1          = new AircraftType()
            {
                Id = _aircraftTypeId, AircraftModel = "Tupolev Tu-134", SeatsNumber = 80, Carrying = 47000
            };
            _type1DTO = new DTO.AircraftType()
            {
                Id = _aircraftTypeId, AircraftModel = "Tupolev Tu-134", SeatsNumber = 80, Carrying = 47000
            };

            A.CallTo(() => _fakeMapper.Map <AircraftType, DTO.AircraftType>(_type1)).Returns(_type1DTO);
            A.CallTo(() => _fakeMapper.Map <DTO.AircraftType, AircraftType>(_type1DTO)).Returns(_type1);

            A.CallTo(() => _fakeUnitOfWork.Set <AircraftType>()).Returns(_fakeAircraftTypeRepository);
            _aircraftTypeService = new AircraftTypeService(_fakeUnitOfWork, _fakeMapper);
        }
示例#4
0
 public AircraftTypeController()
 {
     _actypeService = new AircraftTypeService();
 }
 public RegistrationController()
 {
     _actypeService       = new AircraftTypeService();
     _registrationService = new RegistrationService();
 }
示例#6
0
 public AircraftTypeViewModel()
 {
     _aircraftTypeService = new AircraftTypeService();
 }