示例#1
0
        public void FixtureInit()
        {
            const string testFileName  = @"DataFiles\Chevron June FG 462988.xlsx";
            var          directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase);

            if (directoryName == null)
            {
                return;
            }

            var projectPath = directoryName.Replace("file:\\", "").Replace("\\bin\\Debug", "");

            _extractor = new OrderLineExtractor();
            //_extractor.SourcePath = Path.Combine(projectPath, testFileName);
            _shipService         = A.Fake <IShippingCostService>();
            _templatePathService = new HardCodedTemplatePathService();

            A.CallTo(() => _shipService.BoxFee).Returns(2.50m);
            A.CallTo(() => _shipService.PickPackFee).Returns(0.50m);

            _invoiceService            = new InvoiceService(_extractor, _shipService, _templatePathService);
            _invoiceService.SourcePath = Path.Combine(projectPath, testFileName);
            _freightPurchaseOrders     = _invoiceService.GetFreightPurchaseOrders("462988");
            _productPurchaseOrders     = _invoiceService.GetProductPurchaseOrders("462988");
        }
 public InvoiceService(
     IExtractor <FlexCelOrderLineDto> extractor,
     IShippingCostService shippingCostService,
     ITemplatePathService templatePathService
     )
 {
     _extractor           = extractor;
     _shippingCostService = shippingCostService;
     _templatePathService = templatePathService;
 }
示例#3
0
        public OrderKeyService(
            ITemplatePathService templatePathService,
            IOrderKeyFactory orderKeyFactory,
            IExtractor <OrderKeyRowDto> extractor)
        {
            _orderKeyFactory = orderKeyFactory;
            _extractor       = extractor;

            _extractor.SourcePath = templatePathService.OrderKeyPath;
        }
        public void FixtureInit()
        {
            var directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().CodeBase);

            if (directoryName == null)
            {
                return;
            }

            _projectPath = directoryName.Replace("file:\\", "").Replace("bin\\Debug", "DataFiles");

            _extractor       = new OrderLineExtractor();
            _shipService     = A.Fake <IShippingCostService>();
            _templateService = A.Fake <ITemplatePathService>();

            _invoiceService            = new InvoiceService(_extractor, _shipService, _templateService);
            _invoiceService.SourcePath = Path.Combine(_projectPath, TestFileName);

            A.CallTo(() => _shipService.PickPackFee).Returns(0.50m);
            A.CallTo(() => _shipService.BoxFee).Returns(2.50m);
        }
 public ChevronReport(ITemplatePathService templatePathService)
 {
     _templatePathService = templatePathService;
 }
示例#6
0
 public FlexcelChevronReportAdapter(ITemplatePathService templatePathService)
 {
     _templatePathService = templatePathService;
     _report = new FlexCelReport(true);
 }