public void OutputConsoleTests() { var userDataRepo = new UserDataRepository(); userDataRepo.AddFile("OutputTestsspaceFile.txt"); userDataRepo.AddFile("OutputTestscommaFile.txt"); userDataRepo.AddFile("OutputTestspipeFile.txt"); var outProcessor = new ConsoleOutputProcessor(userDataRepo); // test for females first and last name ascending var out1Data = outProcessor.ArrangeDataforOutput1(); Assert.AreEqual(out1Data[0].LastName, "ot14gaudette"); Assert.AreEqual(out1Data[0].FavoriteColor, "red"); Assert.AreEqual(out1Data[0].favoriteColor, "red"); Assert.AreEqual(out1Data[0].name, "ot14gaudette kady"); // test for sorted by birthday var out2Data = outProcessor.ArrangeDataforOutput2(); Assert.AreEqual(out2Data[0].LastName, "ot11gaudette"); // test for sorted by last name descending var out3Data = outProcessor.ArrangeDataforOutput3(); Assert.AreEqual(out3Data[0].LastName, "ot34gaudette"); }
static void Main(string[] args) { if (args.Length < 3) { Console.WriteLine("You did not enter enough arguments. "); Console.WriteLine(" This is what you should enter:"); Console.WriteLine(" 3FilesAssignment <dataFile> <dataFile> <dataFile> "); Console.WriteLine("please press return"); Console.ReadLine(); return; } var userDataRepo = UserDataRepository.Instance; userDataRepo.AddFile(args[0]); userDataRepo.AddFile(args[1]); userDataRepo.AddFile(args[2]); var outProcessor = new ConsoleOutputProcessor(userDataRepo); outProcessor.processOutput(); Console.WriteLine("please press return"); Console.ReadLine(); }