public void ShouldCalculateSimpleExample1() { List <string> input = SharedLibrary.FileParser.GetStringsFromFile(@"Inputs\Day06_Example1Input.txt"); OrbitMapSolver mapSolver = new OrbitMapSolver(input); int actual = mapSolver.TotalMapDistance; int expected = 42; Assert.Equal(expected, actual); }
public void ShouldCalculateDay6Part1Solution() { List <string> input = SharedLibrary.FileParser.GetStringsFromFile(@"Inputs\Day06Input.txt"); OrbitMapSolver mapSolver = new OrbitMapSolver(input); int actual = mapSolver.TotalMapDistance; int expected = 200001; Assert.Equal(expected, actual); }
public void ShoudlCalculateDistanceExample2() { List <string> input = SharedLibrary.FileParser.GetStringsFromFile(@"Inputs\Day06_Example2Input.txt"); OrbitMapSolver mapSolver = new OrbitMapSolver(input); int actual = mapSolver.GetShortestPathToSanta(); int expected = 4; Assert.Equal(expected, actual); }
public void ShouldCalculateDay6Part2Solution() { List <string> input = SharedLibrary.FileParser.GetStringsFromFile(@"Inputs\Day06Input.txt"); OrbitMapSolver mapSolver = new OrbitMapSolver(input); int actual = mapSolver.GetShortestPathToSanta(); int expected = 379; Assert.Equal(expected, actual); }