public void solve_for_expected_answer_part_two(string input, string expected) { var solver = new DayOneSolver(); var actual = solver.PartTwoSolve(input); actual.Should().Be(expected); }
public void solve_for_unknown_answer_part_two() { var inputs = File.ReadAllLines("./Day01/input_part_one.txt"); var solver = new DayOneSolver(); var actual = inputs.Select(input => int.Parse(solver.PartTwoSolve(input))).Sum(); _outputHelper.WriteLine($"{actual}"); }
static async Task Main(string[] args) { var dayOneSolver = new DayOneSolver("../puzzle_input/day_1.txt"); var solution = await dayOneSolver.SolveAsync().ConfigureAwait(false); Console.WriteLine($"Day 1: {solution}."); var dayTwoSolver = new DayTwoSolver("../puzzle_input/day_2.txt"); var solution2 = await dayTwoSolver.SolveAsync().ConfigureAwait(false); Console.WriteLine($"Day 2: {solution2}."); var dayThreeSolver = new DayThreeSolver("../puzzle_input/day_3.txt"); var solution3 = await dayThreeSolver.SolveAsync().ConfigureAwait(false); Console.WriteLine($"Day 3: {solution3}."); var dayFourSolver = new DayFourSolver("../puzzle_input/day_4.txt"); var solution4 = await dayFourSolver.SolveAsync().ConfigureAwait(false); Console.WriteLine($"Day 4: {solution4}."); var dayFiveSolver = new DayFiveSolver("../puzzle_input/day_5.txt"); var solution5 = await dayFiveSolver.SolveAsync().ConfigureAwait(false); Console.WriteLine($"Day 5: {solution5}."); var daySixSolver = new DaySixSolver("../puzzle_input/day_6.txt"); var solution6 = await daySixSolver.SolveAsync().ConfigureAwait(false); Console.WriteLine($"Day 6: {solution6}."); var daySevenSolver = new DaySevenSolver("../puzzle_input/day_7.txt"); var solution7 = await daySevenSolver.SolveAsync().ConfigureAwait(false); Console.WriteLine($"Day 7: {solution7}."); var dayEightSolver = new DayEightSolver("../puzzle_input/day_8.txt"); var solution8 = await dayEightSolver.SolveAsync().ConfigureAwait(false); Console.WriteLine($"Day 8: {solution8}."); }
static void Main(string[] args) { var solver = new DayOneSolver(new FileReader()); solver.SolvePartOne(); solver.SolvePartTwo(); var solverTwo = new DayTwoSolver(new FileReader()); solverTwo.SolvePartOne(); solverTwo.SolvePartTwo(); var solverThree = new DayThreeSolver(new FileReader()); solverThree.SolvePartOne(); solverThree.SolvePartTwo(); var solverFour = new DayFourSolver(); solverFour.SolvePartOne(); solverFour.SolvePartTwo(); }