//[TestMethod] //public void InboundProcessingCallsFtp() //{ // IManhattanFtp ftp; // ITransferControlConfigurationManager manager; // ILog log; // IFileIo io; // ITransferControlRepository mockRepository = CreateMocks(out ftp, out manager, out log, out io); // MockConfiguration(manager, true); // MockUnprocessedTransferControl(mockRepository); // ftp.Expect(f => f.UploadInboundFile(new FileInfo("mock"))).Repeat.Once().IgnoreArguments(); // ITransferControlInbound inbound = new TransferControlInbound(mockRepository, ftp, manager, log, io); // inbound.Process(); // ftp.VerifyAllExpectations(); //} //[TestMethod] //public void InboundProcessingDoesNotCallFtp() //{ // IManhattanFtp ftp; // ITransferControlConfigurationManager manager; // ILog log; // IFileIo io; // ITransferControlRepository mockRepository = CreateMocks(out ftp, out manager, out log, out io); // MockConfiguration(manager, false); // MockUnprocessedTransferControl(mockRepository); // ftp.Expect(f => f.UploadInboundFile(new FileInfo("mock"))).Repeat.Never().IgnoreArguments(); // ITransferControlInbound inbound = new TransferControlInbound(mockRepository, ftp, manager, log, io); // inbound.Process(); // ftp.VerifyAllExpectations(); //} private static void MockConfiguration(ITransferControlConfigurationManager mockConfiguration, bool enableFtp) { mockConfiguration.Expect(c => c.IsFtpEnabled()).Return(enableFtp); mockConfiguration.Expect(c => c.GetInboundFileProcessedDirectory()).Return("mock"); mockConfiguration.Expect(c => c.GetInboundMasterControlFilename()).Return("mock"); mockConfiguration.Expect(c => c.GetInboundFileDirectory()).Return("mock"); }
public TransferControlJob(ITransferControlConfigurationManager configurationManager, ITransferControlInbound transferControlInbound, ITransferControlOutbound transferControlOutbound) { _configurationManager = configurationManager; _transferTransferControlOutbound = transferControlOutbound; _transferTransferControlInbound = transferControlInbound; }
public PixJob(ILog log, IConfigurationManager configurationManager, IJobRepository jobRepository, ITransferControlRepository transferControlRepository, IPerpetualInventoryTransferRepository perpetualInventoryTransferRepository, IFileIo fileIo, ITransferControlConfigurationManager transferControlConfigurationManager) : base(log, configurationManager, fileIo, jobRepository, transferControlRepository, transferControlConfigurationManager) { _perpetualInventoryTransferRepository = perpetualInventoryTransferRepository; }
public TransferControlOutbound(ITransferControlRepository transferControlRepository, IJobRepository jobRepository, ITransferControlConfigurationManager configuration, ILog log, IFileIo fileIo) { _log = log; _transferControlRepository = transferControlRepository; _configuration = configuration; _jobRepository = jobRepository; _fileIo = fileIo; }
public TransferControlInbound(ITransferControlRepository transferControlRepository, IMainframeFtp manhattanFtp, ITransferControlConfigurationManager configuration, ILog log, IFileIo fileIo) { _log = log; _transferControlRepository = transferControlRepository; _configuration = configuration; _manhattanFtp = manhattanFtp; _fileIo = fileIo; }
protected OutboundProcessor(ILog log, IConfigurationManager configurationManager, IFileIo fileIo, IJobRepository jobRepository, ITransferControlRepository transferControlRepository, ITransferControlConfigurationManager transferControlConfigurationManager) { _log = log; _configurationManager = configurationManager; _fileIo = fileIo; _jobRepository = jobRepository; _transferControlRepository = transferControlRepository; _transferControlConfigurationManager = transferControlConfigurationManager; }
public ShipmentJob(ILog log, ITransferControlRepository transferControlRepository, IJobRepository jobRepository, IShipmentRepository shipmentRepository, IFileIo fileIo, IConfigurationManager configurationManager, ITransferControlConfigurationManager transferControlConfigurationManager) : base(log, configurationManager, fileIo, jobRepository, transferControlRepository, transferControlConfigurationManager) { _shipmentRepository = shipmentRepository; }
public PickTicketJob(ILog logger, IOrderWriter destinationRepository, IConfigurationManager configurationManager, IFileIo fileIo, IJobRepository jobRepository, ITransferControlRepository transferControlRepository, IManhattanOrderRepository manhattanOrderRepository, IAuroraPickTicketRepository auroraPickTicketRepository, IOrderHistoryRepository orderHistoryRepository, ITransferControlConfigurationManager transferControlConfigurationManager) : base(logger, configurationManager, fileIo, jobRepository, transferControlRepository, transferControlConfigurationManager) { _destinationRepository = destinationRepository; _manhattanOrderRepository = manhattanOrderRepository; _auroraPickTicketRepository = auroraPickTicketRepository; _orderHistoryRepository = orderHistoryRepository; }
public InventorySyncJob(ILog log, IConfigurationManager configurationManager, IJobRepository jobRepository, ITransferControlRepository transferControlRepository, IInventorySyncRepository inventorySyncRepository, IFileIo fileIo, ITransferControlConfigurationManager transferControlConfigurationManager, IStlInventoryRepository stlInventoryRepository, IStlInventoryUpdateRepository stlInventoryUpdateRepository, IShipmentInventoryAdjustmentRepository shipmentInventoryAdjustmentRepository, IPerpetualInventoryTransferRepository perpetualInventoryTransferRepository, IPixInventoryAdjustmentRepository pixInventoryAdjustmentRepository) : base(log, configurationManager, fileIo, jobRepository, transferControlRepository, transferControlConfigurationManager) { _inventorySyncRepository = inventorySyncRepository; _stlInventoryRepository = stlInventoryRepository; _stlInventoryUpdateRepository = stlInventoryUpdateRepository; _shipmentInventoryAdjustmentRepository = shipmentInventoryAdjustmentRepository; _perpetualInventoryTransferRepository = perpetualInventoryTransferRepository; _pixInventoryAdjustmentRepository = pixInventoryAdjustmentRepository; _log = log; _configurationManager = configurationManager; }
// Methods private static ITransferControlRepository CreateMocks(out IMainframeFtp mockFtp, out ITransferControlConfigurationManager mockConfiguration, out ILog mockLog, out IFileIo mockFileIo) { var repository = MockRepository.GenerateMock <ITransferControlRepository>(); mockFtp = MockRepository.GenerateMock <IMainframeFtp>(); mockConfiguration = MockRepository.GenerateMock <ITransferControlConfigurationManager>(); mockLog = MockRepository.GenerateMock <ILog>(); mockFileIo = MockRepository.GenerateMock <IFileIo>(); return(repository); }