private static void Main(string[] args) { var options = new Options(); if (args.Length == 0) { Console.WriteLine(options.GetUsage()); return; } if (Parser.Default.ParseArguments(args, options)) { var logger = new LoggerConfiguration() .WriteTo.ColoredConsole() .CreateLogger(); Log.Logger = logger; ProcessArguments(options); LogArguments(options); var marketDataCleanser = new MarketDataCleanser(options.LogTo); var sourceDirectory = new DirectoryInfo(options.DirectoryToRead); var saveToFile = new FileInfo(options.SaveTo); marketDataCleanser.CleanupDataIn(sourceDirectory, saveToFile); } else { Console.WriteLine(options.GetUsage()); } Console.WriteLine("Processing finised. Press any key to continue..."); Console.ReadLine(); }
public void ShouldRecognizeCorrectData() { var service = new MarketDataCleanser(); service.Map(GetDirectoryInfoFor("10_valid_records.json")); logged.ToString() .Should() .Contain("Correct records in set: 10"); }
public void ShouldCleanUpIncorrectData() { var service = new MarketDataCleanser(); service.Map(GetDirectoryInfoFor("9_incorrect_records.json")); logged.ToString() .Should() .Contain("Correct records in set: 0"); }