private static List <List <int> > ReadTestInput() { const string testInputFileName = @"TestData\TestInput.txt"; string[] testInputLines = TestCaseUtilities.ReadTextFile(testInputFileName); List <List <int> > testInputList = new List <List <int> >(); int numberTestCases = Convert.ToInt32(testInputLines[0]); for (int n = 0; n < numberTestCases; n++) { string arrayValuesString = testInputLines[n + 2]; string[] valueArray = arrayValuesString.Split(" "); List <int> valuesList = new List <int>(); foreach (string valueString in valueArray) { int value = Convert.ToInt32(valueString); valuesList.Add(value); } testInputList.Add(valuesList); } return(testInputList); }
private static List <string> ReadTestResults() { const string testResultsFileName = @"TestData\TestResults.txt"; string[] testResultLines = TestCaseUtilities.ReadTextFile(testResultsFileName); List <string> testResultList = new List <string>(testResultLines); return(testResultList); }