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);
        }
コード例 #2
0
        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);
        }