public CarPartControllerBuilder() { _partRepository = Substitute.For <IPartRepository>(); _mappingEngine = Substitute.For <IMappingEngine>(); _carPartRepository = Substitute.For <ICarPartRepository>(); _carRepository = Substitute.For <ICarRepository>(); }
public CarPartsController(ICarPartRepository carPartRepository, ICarRepository carRepository, IPartRepository partRepository, IMappingEngine mappingEngine) { if (carPartRepository == null) { throw new ArgumentNullException(nameof(carPartRepository)); } if (mappingEngine == null) { throw new ArgumentNullException(nameof(mappingEngine)); } if (partRepository == null) { throw new ArgumentNullException(nameof(partRepository)); } if (carRepository == null) { throw new ArgumentNullException(nameof(carRepository)); } _carPartRepository = carPartRepository; _PartRepository = partRepository; _carRepository = carRepository; _mappingEngine = mappingEngine; }
public CarPartControllerBuilder WithCarPartRepository(ICarPartRepository carPartRepository) { _carPartRepository = carPartRepository; return(this); }
public CarPartBusiness(ICarPartRepository carPartRepository, IMapper mapper) { _carPartRepository = carPartRepository; this._mapper = mapper; }
public CarPartService(ICarPartRepository repository) { _repository = repository; }