public RentalAreaService(RentalAreaFactory rentalAreaFactory, ICarRentalUnitOfWork unitOfWork, RentalAreaMapper rentalAreaMapper) { _rentalAreaFactory = rentalAreaFactory; _unitOfWork = unitOfWork; _rentalAreaMapper = rentalAreaMapper; }
public TestContainer() { UnitOfWork = new MemoryCarRentalUnitOfWork(); var carFactory = new CarFactory(); var driverFactory = new DriverFactory(); _rentalFactory = new RentalFactory(); var rentalAreaFactory = new RentalAreaFactory(); var positionService = new PositionService(UnitOfWork); var carMapper = new CarMapper(); var driverMapper = new DriverMapper(); _rentalMapper = new RentalMapper(); var rentalAreaMapper = new RentalAreaMapper(); CarService = new CarService(carFactory, UnitOfWork, carMapper); DriverService = new DriverService(driverFactory, UnitOfWork, driverMapper); RentalService = new RentalService(_rentalFactory, UnitOfWork, _rentalMapper, positionService); RentalAreaService = new RentalAreaService(rentalAreaFactory, UnitOfWork, rentalAreaMapper); }