public void TestMethod1() { INameManager nameManager = new NameManager(); nameManager.SortAllNames("TestFiles\\unsorted-names-list.txt"); Assert.IsTrue(File.Exists(fileResult)); }
static void Main(string[] args) { ILogger _logger = new ConsoleLogger(); try { if (args.Length == 2 && args[0].ToLower() == "name-sorter" && args[1].ToLower() == "./unsorted-names-list.txt") { string fileSource = Path.GetFileName(args[1]); INameManager nameManager = new NameManager(); nameManager.SortAllNames(fileSource); } else { Console.WriteLine("please provide a valid input"); } } catch (Exception ex) { _logger.Log(ex.Message); } Console.ReadLine(); }