public CommodityRequestCheckoutService(ICommodityRequestCheckoutRepository repository, IMapper mapper, ICommodityRepository commodityRepository) { _repository = repository; _mapper = mapper; _commodityRepository = commodityRepository; }
public SourcingContainerViewModelBuilder(IEquipmentRepository equipmentRepository, IHubRepository hubRepository, ICommodityRepository commodityRepository, IContainerTypeRepository containerTypeRepository) { _equipmentRepository = equipmentRepository; _hubRepository = hubRepository; _commodityRepository = commodityRepository; _containerTypeRepository = containerTypeRepository; }
public ReceivedDeliveryRepository(CokeDataContext ctx, IContainerTypeRepository containerTypeRepository, ICostCentreRepository costCentreRepository, IUserRepository userRepository, ICommodityRepository commodityRepository, ICommodityOwnerRepository commodityOwnerRepository, ICommodityProducerRepository commodityProducerRepository) : base(containerTypeRepository, ctx, costCentreRepository, userRepository, commodityRepository, commodityOwnerRepository, commodityProducerRepository) { documents = _ctx.tblSourcingDocument.Where(s => s.DocumentTypeId == (int)DocumentType.ReceivedDelivery); }
public ContainerTypeViewModelBuilder(IContainerTypeRepository containerTypeRepository, ICommodityRepository commodityRepository, IMasterDataUsage masterDataUsage) { _containerTypeRepository = containerTypeRepository; _commodityRepository = commodityRepository; _masterDataUsage = masterDataUsage; }
public CommodityTransferStoreAssignmentViewModelBuilder(ICommodityTransferRepository commodityTransferRepository, IStoreRepository storeRepository, ICommodityRepository commodityRepository, IHubRepository hubRepository) { _commodityTransferRepository = commodityTransferRepository; _storeRepository = storeRepository; _commodityRepository = commodityRepository; _hubRepository = hubRepository; }
public OrderProcessor(IAskRepository askRepository, ICommodityRepository commodityRepository) { this.AskRepository = askRepository; this.CommodityRepository = commodityRepository; OpenAsksByBuyerCommdoity = new ConcurrentDictionary <int, ConcurrentDictionary <int, ConcurrentDictionary <long, ThreadSafeAsk> > >(); OpenAsks = new ConcurrentDictionary <long, ThreadSafeAsk>(); AsksToProcess = new ConcurrentDictionary <long, ThreadSafeAsk>(); }
public DeletePartsInvoicesController(IPartsInvoiceService partsInvoiceService, IPartsInvoiceViewModelSelectListBuilder partsInvoiceViewModelSelectListBuilder, IPartsInvoiceRepository partsInvoiceRepository, ICommodityRepository commodityRepository) : base(partsInvoiceService, partsInvoiceViewModelSelectListBuilder) { this.partsInvoiceService = partsInvoiceService; this.partsInvoiceViewModelSelectListBuilder = partsInvoiceViewModelSelectListBuilder; this.partsInvoiceRepository = partsInvoiceRepository; this.commodityRepository = commodityRepository; }
public ActivityFactory( IInfectionRepository infectionRepository, IShiftRepository shiftRepository, IServiceProviderRepository serviceProviderRepository, IProductRepository productRepository, IServiceRepository serviceRepository, ISeasonRepository seasonRepository, ICommodityRepository commodityRepository) { _infectionRepository = infectionRepository; _shiftRepository = shiftRepository; _serviceProviderRepository = serviceProviderRepository; _productRepository = productRepository; _serviceRepository = serviceRepository; _seasonRepository = seasonRepository; _commodityRepository = commodityRepository; }
public HomeController(IAskRepository askRepository = null, ICommodityRepository commodityRepository = null) { if (askRepository == null) { AskRepository = new AskRepository(); } if (commodityRepository == null) { CommodityRepository = new CommodityRepository(); } }
public CommodityTransferService(IStoreRepository storeRepository, ICommodityRepository commodityRepository, ICommodityStorageRepository commodityStorageRepository, ICostCentreRepository costCentreRepository, IUserRepository userRepository, ISettingsRepository settingsRepository, ICommodityReleaseRepository commodityReleaseRepository, ICommodityTransferRepository commodityTransferRepository) { _storeRepository = storeRepository; _commodityRepository = commodityRepository; _commodityStorageRepository = commodityStorageRepository; _costCentreRepository = costCentreRepository; _userRepository = userRepository; _settingsRepository = settingsRepository; _commodityReleaseRepository = commodityReleaseRepository; _commodityTransferRepository = commodityTransferRepository; }
public Init3006Controller(IPurchaseOrderService purchaseOrderService, IPurchaseInvoiceService purchaseInvoiceService, IGoodsReceiptService goodsReceiptService, IPurchaseOrderRepository purchaseOrderRepository, ICommodityRepository commodityRepository, IVehicleTransferOrderService transferOrderService) : base(purchaseOrderService) { this.purchaseOrderService = purchaseOrderService; this.purchaseInvoiceService = purchaseInvoiceService; this.goodsReceiptService = goodsReceiptService; this.purchaseOrderRepository = purchaseOrderRepository; this.commodityRepository = commodityRepository; this.transferOrderService = transferOrderService; }
public Init3006Controller(IPurchaseOrderService purchaseOrderService, IPurchaseInvoiceService purchaseInvoiceService, IGoodsReceiptService goodsReceiptService, IPurchaseOrderRepository purchaseOrderRepository, ICommodityRepository commodityRepository, ITransferOrderService transferOrderService) : base(purchaseOrderService) { this.purchaseOrderService = purchaseOrderService; this.purchaseInvoiceService = purchaseInvoiceService; this.goodsReceiptService = goodsReceiptService; this.purchaseOrderRepository = purchaseOrderRepository; this.commodityRepository = commodityRepository; this.transferOrderService = transferOrderService; }
public void Commodity_Get_Error_InvalidContent() { try { _commodityRepository = new CommodityRepositoryFake(MakeMockFilePath("commodityResultError.html")); var result = _commodityRepository.Get(); Assert.Null(result); } catch (Exception) { Assert.True(true); } }
public void Commodity_Get_Success() { try { _commodityRepository = new CommodityRepositoryFake(MakeMockFilePath("commodityResultSuccess.html")); var result = _commodityRepository.Get(); Assert.NotNull(result); } catch (Exception) { throw; } }
//private readonly ILogger _logger; public ExcelImportDataService(IScenarioRepository scenarioRepository, IRegionRepository regionRepository, IVariableRepository variableRepository, IVariableXlsDescriptionRepository variableXlsDescriptionRepository, IAgrigationXlsDescriptionRepository agrigationXlsDescriptionRepository, ISubVariableRepository subVariableRepository, ISubVariableDataRepository subVariableDataRepository, IProcessSetRepository processSetRepository, ICommodityRepository commodityRepository, ICommoditySetRepository commoditySetRepository, IAttributeRepository attributeRepository, IUserConstraintRepository userConstraintRepository, IVariableDataRepository variableDataRepository, IRegionAgrigationTypeRepository regionAgrigationTypeRepository, AggregationSumCulculationService aggregationSumulCalculationService, AggregationSumWorldCulculationService aggregationSumWorldCulculationService, IXlsFormulaUpdaterService xlsFormulaUpdaterService, IDataRepository dataRepository, IUnitOfWork unitOfWork, //ILogger<ExcelImportDataService> logger, NxsDbContext context) { ScenarioRepository = scenarioRepository; RegionRepository = regionRepository; ProcessSetRepository = processSetRepository; CommodityRepository = commodityRepository; CommoditySetRepository = commoditySetRepository; AttributeRepository = attributeRepository; UserConstraintRepository = userConstraintRepository; VariableDataRepository = variableDataRepository; SubVariableRepository = subVariableRepository; SubVariableDataRepository = subVariableDataRepository; _aggregationSumCulculationService = aggregationSumulCalculationService; _aggregationSumWorldCulculationService = aggregationSumWorldCulculationService; _xlsFormulaUpdaterService = xlsFormulaUpdaterService; _variableRepository = variableRepository; _variableXlsDescriptionRepository = variableXlsDescriptionRepository; _agrigationXlsDescriptionRepository = agrigationXlsDescriptionRepository; _dataRepository = dataRepository; _context = context; UnitOfWork = unitOfWork; //_logger = logger; _variableDataHandler = new VariableDataHandler(this); _agrigationDataHandler = new AggregationDataHandler(this); _agrigationDataHandlerWorld = new AggregationDataHandlerWorld(this); _aggregationDataHandlerGdp = new AggregationDataHandlerGdp(this); }
public CommodityTest() { // create some mock products to play with List<Commodity> testCommodities = new List<Commodity> { new Commodity { CommodityID = 1, Name = "Wheat",LongName = "",CommodityTypeID = 1, ParentID = null }, new Commodity { CommodityID = 5, Name = "Yellow Wheat",LongName = "",CommodityTypeID = 1, ParentID = 1 }, new Commodity { CommodityID = 6, Name = "Green Wheat",LongName = "",CommodityTypeID = 1, ParentID = 1 }, new Commodity { CommodityID = 3, Name = "CSB",LongName = "",CommodityTypeID = 1, ParentID = null }, new Commodity { CommodityID = 8, Name = "Beans",LongName = "",CommodityTypeID = 1, ParentID = 3 }, }; // Mock the Commodity Repository using Moq Mock<ICommodityRepository> mockCommodityRepository = new Mock<ICommodityRepository>(); // Return all the Commodities mockCommodityRepository.Setup(mr => mr.GetAll()).Returns(testCommodities); // return a Commodity by CommodityId mockCommodityRepository.Setup(mr => mr.FindById( It.IsAny<int>())).Returns((int i) => testCommodities.Where(x => x.CommodityID == i).Single()); //return all parent commodities mockCommodityRepository.Setup(mr => mr.GetAllParents()) .Returns(testCommodities.Where(x => x.ParentID == null).ToList()); //return all children commodities mockCommodityRepository.Setup(mr => mr.GetAllSubCommodities()) .Returns(testCommodities.Where(x => x.ParentID != null).ToList()); //return a commodity by it's name mockCommodityRepository.Setup(mr => mr.GetCommodityByName( It.IsAny<string>())).Returns((string i) => testCommodities.Where(x => x.Name == i).Single()); //retun all commodities by thier parent mockCommodityRepository.Setup(mr=>mr.GetAllSubCommoditiesByParantId( It.IsAny<int>())).Returns((int i) => testCommodities.Where(x => x.ParentID == i).ToList()); this.MockCommodityRepository = mockCommodityRepository.Object; }
public MasterDataHelper() { _commodityRepository = ObjectFactory.GetInstance<ICommodityRepository>(); _productRepository = ObjectFactory.GetInstance<IProductRepository>(); _containerTypeRepository = ObjectFactory.GetInstance<IContainerTypeRepository>(); }
public CommoditiesApiController(ICommodityRepository commodityRepository) { this.commodityRepository = commodityRepository; }
public CommodityDeliveryFactory(ICostCentreRepository costCentreRepository, IUserRepository userRepository, ICommodityRepository commodityRepository, IContainerTypeRepository containerTypeRepository) : base(costCentreRepository, userRepository) { _commodityRepository = commodityRepository; _containerTypeRepository = containerTypeRepository; }
//protected IBankRepository _bankRepository; //protected IBankBranchRepository _bankBranchRepository; #region Constructors public InsertTestData(IOutletVisitReasonsTypeRepository visitReasonsTypeRepository,IActivityTypeRepository activityTypeRepository,IContainerTypeRepository containerTypeRepository, IRetireDocumentSettingRepository retireDocumentSettingRepository, IOutletPriorityRepository outletPriorityRepository, IOutletVisitDayRepository outletVisitDayRepository, IAssetStatusRepository assetStatusRepository, IAssetCategoryRepository assetCategoryRepository, IUserGroupRepository userGroupRepository, IUserGroupRolesRepository userGroupRolesRepository, ISalesmanRouteRepository salesmanRouteRepository, IProductTypeRepository productTypeRepository, IProductBrandRepository productBrandRepository, IProductFlavourRepository productFlavourRepository, IProductPackagingRepository productPackagingRepository, IProductPackagingTypeRepository productPackagingTypeRepository, IProductRepository productRepository, IRegionRepository regionRepository, ICostCentreRepository costCentreRepository, ICostCentreFactory costCentreFactory, IProductPricingRepository pricingRepository, IVATClassRepository vatClassRepository, IVATClassFactory vatClassFactory, ICountryRepository countryRepository, IProductPricingFactory productPricingFactory, IProductPricingTierRepository productPricingTierRepository, IOutletTypeRepository outletTypeRepository, IUserRepository userRepository, IOutletRepository outletRepository, IRouteRepository routeRepository, IRouteFactory routeFactory, ITransporterRepository transporterRepository, IProductFactory productFactory, IDistributorSalesmanRepository distributorSalesmanRepository, IProducerRepository producerRepository, IDocumentFactory documentFactory, ISocioEconomicStatusRepository socioEconomicStatusRepository, IClientMasterDataTrackerRepository clientMasterDataTrackerRepository, IDistributorRepository distributorrepository, IOutletCategoryRepository outletCategoryRepository, ITerritoryRepository territoryRepository, IAreaRepository areaRepository, IContactRepository contactRepository, IAccountRepository accountRepository, IAccountTransactionRepository accountTransactionRepository, IInventoryRepository inventoryRepository, IInventoryTransactionRepository inventoryTransactionRepository, ICostCentreApplicationRepository costCentreApplicationRepository, IChannelPackagingRepository channelPackagingRepository, ICompetitorRepository competitorRepository, ICompetitorProductsRepository competitorProductRepository, IAssetRepository coolerRepository, IAssetTypeRepository coolerTypeRepository, IDistrictRepository districtRepository, IProvincesRepository provinceRepository, IReOrderLevelRepository reorderLevelRepository, ITargetPeriodRepository targetPeriodRepository, ITargetRepository targetRepository, IProductDiscountFactory productDiscountFactory, IProductDiscountRepository productDiscountRepository, ISaleValueDiscountFactory saleValueDiscountFactory, ISaleValueDiscountRepository saleValueDiscountRepository, IBankRepository bankRepository, IBankBranchRepository bankBranchRepository, ISupplierRepository supplierRepository, ICreatePaymentNoteCommandHandler createLossCommandHandler, IAddPaymentNoteLineItemCommandHandler addLossLineItemCommandHandler, IConfirmPaymentNoteCommandHandler confirmLossCommandHandler, IContactTypeRepository contactTypeRepository, IDiscountGroupRepository discountGroupRepository, IProductDiscountGroupFactory productDiscountGroupFactory, ICertainValueCertainProductDiscountFactory certainValueCertainProductDiscountFactory, ICustomerDiscountFactory customerDiscountFactory, IPromotionDiscountFactory promotionDiscountFactory, IProductDiscountGroupRepository productDiscountGroupRepository, IPromotionDiscountRepository promotionDiscountRepository, IFreeOfChargeDiscountRepository freeOfChargeDiscountRepository, ICertainValueCertainProductDiscountRepository certainValueCertainProductDiscountRepository, ITargetItemRepository targetItemRepository, ISettingsRepository settingsRepository, ICentreRepository centreRepository, ICentreTypeRepository centreTypeRepository, ICommoditySupplierRepository commoditySupplierRepository, ICommodityOwnerTypeRepository commodityOwnerTypeRepository, ICommodityOwnerRepository commodityOwnerRepository, ICommodityProducerRepository commodityProducerRepository, ICommodityRepository commodityRepository, ICommodityTypeRepository commodityTypeRepository, IEquipmentRepository equipmentRepository, IMasterDataAllocationRepository masterDataAllocationRepository,IVehicleRepository vehicleRepository,IHubRepository hubRepository, IPurchasingClerkRouteRepository purchasingClerkRouteRepository,IInfectionRepository infectionRepository,ISeasonRepository seasonRepository,IServiceProviderRepository serviceProviderRepository,IServiceRepository serviceRepository,IShiftRepository shiftRepository,ISalesmanSupplierRepository salesmanSupplierRepository ) { _salesmanSupplierRepository = salesmanSupplierRepository; _productTypeRepository = productTypeRepository; _productBrandRepository = productBrandRepository; _productFlavourRepository = productFlavourRepository; _productPackagingRepository = productPackagingRepository; _productPackagingTypeRepository = productPackagingTypeRepository; _productRepository = productRepository; _regionRepository = regionRepository; _costCentreRepository = costCentreRepository; _costCentreFactory = costCentreFactory; _pricingRepository = pricingRepository; _vatClassRepository = vatClassRepository; _vatClassFactory = vatClassFactory; _countryRepository = countryRepository; _productPricingFactory = productPricingFactory; _ProductPricingTierRepository = productPricingTierRepository; _outletTypeRepository = outletTypeRepository; _userRepository = userRepository; _outletRepository = outletRepository; _routeRepository = routeRepository; _routeFactory = routeFactory; _transporterRepository = transporterRepository; _productFactory = productFactory; _distributorSalesmanRepository = distributorSalesmanRepository; _producerRepository = producerRepository; _documentFactory = documentFactory; _socioEconomicStatusRepository = socioEconomicStatusRepository; _clientMasterDataTrackerRepository = clientMasterDataTrackerRepository; _distributorrepository = distributorrepository; _outletCategoryRepository = outletCategoryRepository; //_createOrderCommandHandler = createOrderCommandHandler; _territoryRepository = territoryRepository; _areaRepository = areaRepository; _contactRepository = contactRepository; _accountRepository = accountRepository; _accountTransactionRepository = accountTransactionRepository; _inventoryRepository = inventoryRepository; _inventoryTransactionRepository = inventoryTransactionRepository; _costCentreApplicationRepository = costCentreApplicationRepository; _channelPackagingRepository = channelPackagingRepository; _competitorRepository = competitorRepository; _competitorProductRepository = competitorProductRepository; _coolerRepository = coolerRepository; _coolerTypeRepository = coolerTypeRepository; _districtRepository = districtRepository; _provinceRepository = provinceRepository; _reorderLevelRepository = reorderLevelRepository; _targetPeriodRepository = targetPeriodRepository; _targetRepository = targetRepository; _productDiscountFactory = productDiscountFactory; _productDiscountRepository = productDiscountRepository; _saleValueDiscountFactory = saleValueDiscountFactory; _saleValueDiscountRepository = saleValueDiscountRepository; _salesmanRouteRepository = salesmanRouteRepository; _userGroupRepository = userGroupRepository; _userGroupRolesRepository = userGroupRolesRepository; _bankRepository = bankRepository; _bankBranchRepository = bankBranchRepository; _supplierRepository = supplierRepository; _createLossCommandHandler = createLossCommandHandler; _addLossLineItemCommandHandler = addLossLineItemCommandHandler; _confirmLossCommandHandler = confirmLossCommandHandler; _contactTypeRepository = contactTypeRepository; _assetCategoryRepository = assetCategoryRepository; _assetStatusRepository = assetStatusRepository; _discountGroupRepository = discountGroupRepository; _productDiscountGroupFactory = productDiscountGroupFactory; _certainValueCertainProductDiscountFactory = certainValueCertainProductDiscountFactory; _customerDiscountFactory = customerDiscountFactory; _promotionDiscountFactory = promotionDiscountFactory; _productDiscountGroupRepository = productDiscountGroupRepository; _promotionDiscountRepository = promotionDiscountRepository; _freeOfChargeDiscountRepository = freeOfChargeDiscountRepository; _certainValueCertainProductDiscountRepository = certainValueCertainProductDiscountRepository; _outletPriorityRepository = outletPriorityRepository; _outletVisitDayRepository = outletVisitDayRepository; _targetItemRepository = targetItemRepository; _settingsRepository = settingsRepository; _retireDocumentSettingRepository = retireDocumentSettingRepository; _commodityOwnerTypeRepository = commodityOwnerTypeRepository; _commodityOwnerRepository = commodityOwnerRepository; _commoditySupplierRepository = commoditySupplierRepository; _centreTypeRepository = centreTypeRepository; _centreRepository = centreRepository; _commodityProducerRepository = commodityProducerRepository; _commodityRepository = commodityRepository; _commodityTypeRepository = commodityTypeRepository; _equipmentRepository = equipmentRepository; _masterDataAllocationRepository = masterDataAllocationRepository; _containerTypeRepository = containerTypeRepository; _hubRepository = hubRepository; _vehicleRepository = vehicleRepository; _purchasingClerkRouteRepository = purchasingClerkRouteRepository; _ShiftRepository = shiftRepository; _SeasonRepository = seasonRepository; _ServiceProviderRepository = serviceProviderRepository; _ServiceRepository = serviceRepository; _InfectionRepository = infectionRepository; _activityTypeRepository = activityTypeRepository; _outletVisitReasonsTypeRepository = visitReasonsTypeRepository; }
public BasisValuesInput(ICommodityRepository commodityRepository) { _commodityRepository = commodityRepository; }
static CommodityService() { repository = new CommodityRepository(); }
public ItemService(ICommodityRepository commodityRepository) : base(commodityRepository) { }
public SourcingInventoryRepository(CokeDataContext ctx, ICommodityRepository commodityRepository, ICostCentreRepository costCentreRepository) { _ctx = ctx; _commodityRepository = commodityRepository; _costCentreRepository = costCentreRepository; }
//Load the repository via DI public CommoditiesController(CommodityRepository commodities) { //Set the local variable to the injected one _commodities = commodities; }
public WarehouseCommodityRequestFormChekoutHandler(ICommodityRequestCheckoutRepository repository, ICommodityRepository commodityRepository) { _repository = repository; _commodityRepository = commodityRepository; }
public QuoteController(ICommodityRepository repository) { this.CommodityRepository = repository; }
public CommodityReceptionNoteFactory(ICostCentreRepository costCentreRepository, IUserRepository userRepository, IContainerTypeRepository containerTypeRepository, ICommodityRepository commodityRepository) : base(costCentreRepository, userRepository) { _containerTypeRepository = containerTypeRepository; _commodityRepository = commodityRepository; }
public CommodityImporterService(CokeDataContext ctx, ICommodityRepository commodityRepository) { _ctx = ctx; _commodityRepository = commodityRepository; }
public CommoditiesController(IUnitOfWork unitOfWork, ICommodityRepository commodityRepository, IRedisConnectionFactory cache) { _unitOfWork = unitOfWork; _commodityRepository = commodityRepository; _cache = cache; }
public CommodityWarehouseStorageRepository(IContainerTypeRepository equipmentRepository, CokeDataContext ctx, ICostCentreRepository costCentreRepository, IUserRepository userRepository, ICommodityRepository commodityRepository, ICommodityOwnerRepository commodityOwnerRepository, ICommodityProducerRepository commodityProducerRepository) : base(equipmentRepository, ctx, costCentreRepository, userRepository, commodityRepository, commodityOwnerRepository, commodityProducerRepository) { documents = _ctx.tblSourcingDocument.Where(s => s.DocumentTypeId == (int)DocumentType.CommodityWarehouseStorage); }
public MaterialService(ICommodityRepository commodityRepository) : base(commodityRepository) { }
public CommodityService(ICommodityRepository commodityRepository, IUnitOfWork unitOfWork) { this._commodityRepository = commodityRepository; this._unitOfWork = unitOfWork; }
public ProductService(ICommodityRepository commodityRepository) : base(commodityRepository) { }
public CommodityService(ICommodityRepository CommodityRepository) : base(CommodityRepository) { this.CommodityRepository = CommodityRepository; }
public CommodityTransferRepository(IContainerTypeRepository equipmentRepository, CokeDataContext ctx, ICostCentreRepository costCentreRepository, IUserRepository userRepository, ICommodityRepository commodityRepository, ICommodityOwnerRepository commodityOwnerRepository, ICommodityProducerRepository commodityProducerRepository, IStoreRepository storeRepository) : base(equipmentRepository, ctx, costCentreRepository, userRepository, commodityRepository, commodityOwnerRepository, commodityProducerRepository) { _storeRepository = storeRepository; documents = _ctx.tblSourcingDocument.Where(s => s.DocumentTypeId == (int)DocumentType.CommodityTransferNote); }
public ReceivedDeliveryNoteFactory(ICostCentreRepository costCentreRepository, IUserRepository userRepository, ICommodityRepository commodityRepository) : base(costCentreRepository, userRepository) { _commodityRepository = commodityRepository; }
public MasterDataEnvelopeBuilder(IProductTypeRepository productTypeRepository, IProductBrandRepository productBrandRepository, IProductFlavourRepository productFlavourRepository, IProductPackagingRepository productPackagingRepository, IProductPackagingTypeRepository productPackagingTypeRepository, IProductRepository productRepository, IRegionRepository regionRepository, ICostCentreRepository costCentreRepository, ICostCentreApplicationRepository costCentreApplicationRepository, IProductPricingRepository pricingRepository, IVATClassRepository vatClassRepository, IProductPricingTierRepository productPricingTierRepository, ICountryRepository countryRepository, IOutletTypeRepository outletTypeRepository, IUserRepository userRepository, IOutletRepository outletRepository, IRouteRepository routeRepository, ITransporterRepository transporterRepository, IDistributorSalesmanRepository distributorSalesmanRepository, IProducerRepository producerRepository, IDistributorRepository distributorrepository, ISocioEconomicStatusRepository socioEconomicStatusRepository, IOutletCategoryRepository outletCategoryRepository, ITerritoryRepository territoryRepository, IAreaRepository areaRepository, IContactRepository contactRepository, IDistributorPendingDispatchWarehouseRepository distributorPendingDispatchWarehouseRepository, IChannelPackagingRepository channelPackagingRepository, ICompetitorRepository competitorRepository, ICompetitorProductsRepository competitorProductsRepository, IAssetRepository coolerRepository, IAssetTypeRepository coolerTypeRepository, IDistrictRepository districtRepository, IProvincesRepository provinceRepository, IReOrderLevelRepository reorderLevelRepository, ITargetPeriodRepository targetPeriodRepository, ITargetRepository targetRepository, IProductDiscountRepository productDiscountRepository, ISaleValueDiscountRepository saleValueDiscountRepository, IDiscountGroupRepository discountGroupRepository, IPromotionDiscountRepository promotionDiscountRepository, ICertainValueCertainProductDiscountRepository certainValueCertainProductDiscountRepository, IFreeOfChargeDiscountRepository freeOfChargeDiscountRepository, IProductDiscountGroupRepository productDiscountGroupRepository, ISalesmanRouteRepository salesmanRouteRepository, IContainmentRepository containmentRepository, IUserGroupRepository userGroupRepository, IUserGroupRolesRepository userGroupRolesRepository, IBankRepository bankRepository, IBankBranchRepository bankBranchRepository, ISupplierRepository supplierRepository, IContactTypeRepository contactTypeRepository, IAssetCategoryRepository assetCategoryRepository, IAssetStatusRepository assetStatusRepository, IOutletVisitDayRepository outletVisitDayRepository, IOutletPriorityRepository outletPriorityRepository, ITargetItemRepository targetItemRepository, ISettingsRepository settingsRepository, IInventoryRepository inventoryRepository, IPaymentTrackerRepository paymentTrackerRepository, IRetireDocumentSettingRepository retireDocumentSettingRepository, ICommodityTypeRepository commodityTypeRepository, ICommodityRepository commodityRepository, ICommodityOwnerTypeRepository commodityOwnerTypeRepository, ICommodityProducerRepository commodityProducerRepository, ICommoditySupplierRepository commoditySupplierRepository, ICommodityOwnerRepository commodityOwnerRepository, ICentreRepository centreRepository, IHubRepository hubRepository, IPurchasingClerkRepository purchasingClerkRepository, IPurchasingClerkRouteRepository purchasingClerkRouteRepository, ICentreTypeRepository centreTypeRepository, IEquipmentRepository equipmentRepository, IStoreRepository storeRepository, IMasterDataAllocationRepository masterDataAllocationRepository, IContainerTypeRepository containerTypeRepository, IVehicleRepository vehicleRepository) { _productTypeRepository = productTypeRepository; _productBrandRepository = productBrandRepository; _productFlavourRepository = productFlavourRepository; _productPackagingRepository = productPackagingRepository; _productPackagingTypeRepository = productPackagingTypeRepository; _productRepository = productRepository; _regionRepository = regionRepository; _costCentreRepository = costCentreRepository; _costCentreApplicationRepository = costCentreApplicationRepository; _pricingRepository = pricingRepository; _vatClassRepository = vatClassRepository; _ProductPricingTierRepository = productPricingTierRepository; _countryRepository = countryRepository; _outletTypeRepository = outletTypeRepository; _userRepository = userRepository; _outletRepository = outletRepository; _routeRepository = routeRepository; _transporterRepository = transporterRepository; _distributorSalesmanRepository = distributorSalesmanRepository; _producerRepository = producerRepository; _distributorrepository = distributorrepository; _socioEconomicStatusRepository = socioEconomicStatusRepository; _outletCategoryRepository = outletCategoryRepository; _territoryRepository = territoryRepository; _areaRepository = areaRepository; _contactRepository = contactRepository; _distributorPendingDispatchWarehouseRepository = distributorPendingDispatchWarehouseRepository; _channelPackagingRepository = channelPackagingRepository; _competitorRepository = competitorRepository; _competitorProductsRepository = competitorProductsRepository; _coolerRepository = coolerRepository; _coolerTypeRepository = coolerTypeRepository; _districtRepository = districtRepository; _provinceRepository = provinceRepository; _reorderLevelRepository = reorderLevelRepository; _targetPeriodRepository = targetPeriodRepository; _targetRepository = targetRepository; _productDiscountRepository = productDiscountRepository; _saleValueDiscountRepository = saleValueDiscountRepository; _discountGroupRepository = discountGroupRepository; _promotionDiscountRepository = promotionDiscountRepository; _certainValueCertainProductDiscountRepository = certainValueCertainProductDiscountRepository; _freeOfChargeDiscountRepository = freeOfChargeDiscountRepository; _productDiscountGroupRepository = productDiscountGroupRepository; _salesmanRouteRepository = salesmanRouteRepository; _containmentRepository = containmentRepository; _userGroupRepository = userGroupRepository; _userGroupRolesRepository = userGroupRolesRepository; _bankRepository = bankRepository; _bankBranchRepository = bankBranchRepository; _supplierRepository = supplierRepository; _contactTypeRepository = contactTypeRepository; _assetCategoryRepository = assetCategoryRepository; _assetStatusRepository = assetStatusRepository; _outletVisitDayRepository = outletVisitDayRepository; _outletPriorityRepository = outletPriorityRepository; _targetItemRepository = targetItemRepository; _settingsRepository = settingsRepository; _inventoryRepository = inventoryRepository; _paymentTrackerRepository = paymentTrackerRepository; _retireDocumentSettingRepository = retireDocumentSettingRepository; _commodityTypeRepository = commodityTypeRepository; _commodityRepository = commodityRepository; _commodityOwnerTypeRepository = commodityOwnerTypeRepository; _commodityProducerRepository = commodityProducerRepository; _commoditySupplierRepository = commoditySupplierRepository; _commodityOwnerRepository = commodityOwnerRepository; _centreRepository = centreRepository; _hubRepository = hubRepository; _purchasingClerkRepository = purchasingClerkRepository; _purchasingClerkRouteRepository = purchasingClerkRouteRepository; _centreTypeRepository = centreTypeRepository; _equipmentRepository = equipmentRepository; _storeRepository = storeRepository; _masterDataAllocatioRepository = masterDataAllocationRepository; _containerTypeRepository = containerTypeRepository; _vehicleRepository = vehicleRepository; }
public CommodityWarehouseStorageFactory(ICostCentreRepository costCentreRepository, IUserRepository userRepository, ICommodityRepository commodityRepository, IContainerTypeRepository containerTypeRepository) : base(costCentreRepository, userRepository) { _commodityRepository = commodityRepository; _containerTypeRepository = containerTypeRepository; }
public CommoditiesController(ICommodityRepository commodityRepository, DatabaseContext context) : base(commodityRepository, context) { _commodityRepository = commodityRepository; _context = context; }
public CommodityGroupController(ICommodityRepository commodityRepository) { mc_CommodityRepository = commodityRepository; }
public CommoditysController(ICommodityRepository commodityRepository) { _commodityRepository = commodityRepository; }
public DTOToEntityMapping(IProductPricingRepository productPricingRepository,IProductTypeRepository productTypeRepository, IRegionRepository regionRepository, IContactTypeRepository contactTypeRepository, IUserRepository userRepository, IProductPricingTierRepository pricingTierRepository, IRouteRepository routeRepository, IOutletCategoryRepository outletCategoryRepository, IOutletTypeRepository outletTypeRepository, IContactRepository contactRepository, IDiscountGroupRepository discountGroupRepository, IVATClassRepository vatClassRepository, IDistributorRepository distributorRepository, ICountryRepository countryRepository, ISupplierRepository supplierRepository, IProductBrandRepository productBrandRepository, IProductRepository productRepository, IProductFlavourRepository productFlavourRepository, IUserGroupRepository userGroupRepository, ICostCentreRepository costCentreRepository, IProvincesRepository provincesRepository, ITargetPeriodRepository targetPeriodRepository, IAssetCategoryRepository assetCategoryRepository, IAssetStatusRepository assetStatusRepository, IAssetTypeRepository assetTypeRepository, IProductPackagingRepository productPackagingRepository, IBankRepository bankRepository, ICompetitorRepository competitorRepository, IProductPackagingTypeRepository productPackagingTypeRepository, IContainmentRepository containmentRepository, ITargetRepository targetRepository, ICommodityTypeRepository commodityTypeRepository, ICommodityRepository commodityRepository, ICommodityOwnerTypeRepository commodityOwnerTypeRepository, ICommodityProducerRepository commodityProducerRepository, ICommoditySupplierRepository commoditySupplierRepository, ICommodityOwnerRepository commodityOwnerRepository, ICentreRepository centreRepository, IHubRepository hubRepository, IPurchasingClerkRepository purchasingClerkRepository, ICentreTypeRepository centreTypeRepository, IContainerTypeRepository containerTypeRepository, IVehicleRepository vehicleRepository ) { _productTypeRepository = productTypeRepository; _regionRepository = regionRepository; _contactTypeRepository = contactTypeRepository; // _maritalStatusRepository = maritalStatusRepository; _userRepository = userRepository; _pricingTierRepository = pricingTierRepository; _routeRepository = routeRepository; _outletCategoryRepository = outletCategoryRepository; _outletTypeRepository = outletTypeRepository; _contactRepository = contactRepository; _discountGroupRepository = discountGroupRepository; _vatClassRepository = vatClassRepository; _distributorRepository = distributorRepository; _countryRepository = countryRepository; _supplierRepository = supplierRepository; _productBrandRepository = productBrandRepository; _productRepository = productRepository; _productFlavourRepository = productFlavourRepository; _userGroupRepository = userGroupRepository; _costCentreRepository = costCentreRepository; _provincesRepository = provincesRepository; _targetPeriodRepository = targetPeriodRepository; _assetCategoryRepository = assetCategoryRepository; _assetStatusRepository = assetStatusRepository; _assetTypeRepository = assetTypeRepository; _productPackagingRepository = productPackagingRepository; _bankRepository = bankRepository; _competitorRepository = competitorRepository; _productPackagingTypeRepository = productPackagingTypeRepository; _containmentRepository = containmentRepository; _productPricingRepository = productPricingRepository; _targetRepository = targetRepository; _commodityTypeRepository = commodityTypeRepository; _commodityRepository = commodityRepository; _commodityOwnerTypeRepository = commodityOwnerTypeRepository; _commodityProducerRepository = commodityProducerRepository; _commoditySupplierRepository = commoditySupplierRepository; _commodityOwnerRepository = commodityOwnerRepository; _centreRepository = centreRepository; _hubRepository = hubRepository; _purchasingClerkRepository = purchasingClerkRepository; _centreTypeRepository = centreTypeRepository; _containerTypeRepository = containerTypeRepository; _vehicleRepository = vehicleRepository; //SetupAutomapperMappings(); }
public CommodityAPIsController(ICommodityRepository commodityRepository, ICommodityAPIRepository commodityAPIRepository) { this.commodityRepository = commodityRepository; this.commodityAPIRepository = commodityAPIRepository; }
public CommodityController(ICommodityRepository Commodity) { _Commodity = Commodity; }
public CommodityService(ICommodityRepository commodityRepository) : base(commodityRepository, null, "CommoditySaveRelative") { }
public CommodityImportService(ICommodityRepository commodityRepository, ICommodityTypeRepository commodityTypeRepository) { _commodityRepository = commodityRepository; _commodityTypeRepository = commodityTypeRepository; }
public CommodityRepositoryTest() { //List<Commodity> testChildren = new List<Commodity> // { // new Commodity { CommodityID = 5, Name = "Yellow Wheat",LongName = "",CommodityTypeID = 1, ParentID = 1 }, // new Commodity { CommodityID = 7, Name = "Green Wheat",LongName = "",CommodityTypeID = 1, ParentID = 1 }, // }; // create some mock products to play with List<Commodity> testCommodities = new List<Commodity> { new Commodity { CommodityID = 1, Name = "Wheat",LongName = "",CommodityTypeID = 1, ParentID = null }, new Commodity { CommodityID = 5, Name = "Yellow Wheat",LongName = "",CommodityTypeID = 1, ParentID = 1 }, new Commodity { CommodityID = 7, Name = "Green Wheat",LongName = "",CommodityTypeID = 1, ParentID = 1 }, new Commodity { CommodityID = 3, Name = "CSB",LongName = "",CommodityTypeID = 1, ParentID = null }, new Commodity { CommodityID = 8, Name = "Beans",LongName = "",CommodityTypeID = 1, ParentID = 3 }, }; // Mock the Commodity Repository using Moq Mock<ICommodityRepository> mockCommodityRepository = new Mock<ICommodityRepository>(); // Return all the Commodities mockCommodityRepository.Setup(mr => mr.GetAll()).Returns(testCommodities); // return a Commodity by CommodityId mockCommodityRepository.Setup(mr => mr.FindById( It.IsAny<int>())).Returns((int i) => testCommodities.Where(x => x.CommodityID == i).Single()); //return all parent commodities mockCommodityRepository.Setup(mr => mr.GetAllParents()) .Returns(testCommodities.Where(x => x.ParentID == null).ToList()); //return all children commodities mockCommodityRepository.Setup(mr => mr.GetAllSubCommodities()) .Returns(testCommodities.Where(x => x.ParentID != null).ToList()); //return a commodity by it's name mockCommodityRepository.Setup(mr => mr.GetCommodityByName( It.IsAny<string>())).Returns((string i) => testCommodities.Where(x => x.Name == i).Single()); //retun all commodities by thier parent mockCommodityRepository.Setup(mr=>mr.GetAllSubCommoditiesByParantId( It.IsAny<int>())).Returns((int i) => testCommodities.Where(x => x.ParentID == i).ToList()); // return a Commodity by CommodityId mockCommodityRepository.Setup(mr => mr.DeleteByID( It.IsAny<int>())).Returns( (int i)=> { var original = testCommodities.Single (q => q.CommodityID == i); var childsCount = testCommodities.Count(c => c.ParentID == i); if (original == null || childsCount != 0) { return false; } else { testCommodities.Remove(original); return true; } }); //test deletion of commodity by id mockCommodityRepository.Setup(mr => mr.Delete( It.IsAny<Commodity>())).Returns( (Commodity target) => { var original = testCommodities.Single (q => q.CommodityID == target.CommodityID); var childsCount = testCommodities.Count(c => c.ParentID == target.CommodityID); if (original == null || childsCount != 0) { return false; } else { testCommodities.Remove(original); return true; } }); //returns bool if we can save one additional(adding )scheme mockCommodityRepository.Setup(mr => mr.SaveChanges(It.IsAny<Commodity>())).Returns( (Commodity target) => { var original = testCommodities.Single (q => q.CommodityID == target.CommodityID); if (original == null) { return false; } original.Name = target.Name; original.LongName = target.LongName; original.CommodityTypeID = target.CommodityTypeID; original.ParentID = target.ParentID; return true; }); //TODO remove the lines below duplicate of the mockCommodityRepository.Setup(mr => mr.Add(It.IsAny<Commodity>())).Returns( (Commodity target) => { if (target.CommodityID.Equals(default(int))) { target.CommodityID = testCommodities.Count() + 1; testCommodities.Add(target); } else { var original = testCommodities.Single (q => q.CommodityID == target.CommodityID); if (original == null) { return false; } original.Name = target.Name; original.LongName = target.LongName; original.CommodityTypeID = target.CommodityTypeID; original.ParentID = target.ParentID; } return true; }); this.MockCommodityRepository = mockCommodityRepository.Object; }
public CommodityTransferNoteFactory(ICostCentreRepository costCentreRepository, IUserRepository userRepository, ICommodityRepository commodityRepository) : base(costCentreRepository, userRepository) { _commodityRepository = commodityRepository; }
public CommodityController(ICommodityRepository commodityRepository, IMapper mapper) { _commodityRepository = commodityRepository; _mapper = mapper; }
public void Setup() { _testHelper = ObjectFactory.GetInstance<TestHelper>(); _commodityRepository = _testHelper.Ioc<ICommodityRepository>(); }
public OrderController(IOrderDetailRepository orderDetailRepository, ICommodityRepository commodityRepository, IExpressageRepository expressageRepository) { _orderDetailRepository = orderDetailRepository; _commodityRepository = commodityRepository; _expressageRepository = expressageRepository; }