private static IList <int> GetDay23Input() { var path = $"{SD.Path}23{SD.Ext}"; if (!File.Exists(path)) { throw new Exception($"Cannot locate file {path}"); } var inputLines = File.ReadAllLines(path); return(CrabCupHelper.ParseInputLine(inputLines[0])); }
public void ParseInputLineTest() { var testData = new List <Tuple <string, IList <int> > >() { new Tuple <string, IList <int> >( "389125467", new List <int>() { 3, 8, 9, 1, 2, 5, 4, 6, 7 }) }; foreach (var testExample in testData) { var actual = CrabCupHelper.ParseInputLine(testExample.Item1); Assert.Equal(testExample.Item2, actual); } }