Ejemplo n.º 1
0
        private static void Main(string[] args)
        {
            var             inputFilePath  = @""; // absolute path
            var             outputFilePath = @""; // absolute path
            var             logFilePath    = @""; // absolute path
            ITradeProcessor tradeProcessor = new TradeProcessor();

            tradeProcessor.Process(inputFilePath, outputFilePath, logFilePath);
        }
Ejemplo n.º 2
0
 public void run()
 {
     if (TestFileCount.HasValue)
     {
         Tester.CreateTestFile(AppDomain.CurrentDomain.BaseDirectory, TestFileCount.Value);
     }
     if (TradeProcessor != null)
     {
         TradeProcessor.Process();
     }
 }
Ejemplo n.º 3
0
        public void Process_should_write_csv_file(string inputFile, string outputFile, string expectedFile, string logFile)
        {
            var             inputFilePath    = Path.Combine(GetDataFolder(), inputFile);
            var             outputFilePath   = Path.Combine(GetDataFolder(), outputFile);
            var             expectedFilePath = Path.Combine(GetDataFolder(), expectedFile);
            var             logFilePath      = Path.Combine(GetDataFolder(), logFile);
            ITradeProcessor tradeProcessor   = new TradeProcessor();

            tradeProcessor.Process(inputFilePath, outputFilePath, logFilePath);
            Assert.IsTrue(File.Exists(outputFilePath));
            CollectionAssert.AreEqual(File.ReadAllLines(expectedFilePath), File.ReadAllLines(outputFilePath));
            var outputLogFile = logFilePath + DateTime.Today.ToString("yyyyMMdd");

            Assert.IsTrue(File.Exists(outputLogFile));
        }