public void Setup() { _products = SetupProducts(); _productRepository = SetupProductRepository(); var mapperConfig = new MapperConfiguration(cfg => cfg.AddProfiles(new[] { "refactor-me.Logic", "refactor-me.Data" })); _mapper = new Mapper(mapperConfig); _persistanceFactory = new Mock <IPersistanceFactory>().Object; _productLibrary = new ProductLibrary(_persistanceFactory, _mapper, _productRepository); }
public ProductOptionLibrary(IPersistanceFactory persistanceFactory, IMapper mapper, IGenericRepository <ProductOption> productOptionRepository) : base(mapper) { Mapper = mapper; _productOptionRepository = persistanceFactory.BuildRefactorMeRepository <ProductOption>() ?? productOptionRepository; }