public async Task Can_Solve_Puzzle_With_Input_And_Input_File( string year, string day, string[] arguments, string[] expected) { // Arrange var browser = new BrowserFixture(OutputHelper); await browser.WithPageAsync(async (page) => { PuzzleSolver solver = await LoadApplication(page); await solver.SelectYearAsync(year); await solver.SelectDayAsync(day); await solver.InputArgumentsAsync(arguments); string input = await GetPuzzleInputAsync(year, day); await solver.SelectInputAsync(input); // Act await solver.SolveAsync(); // Assert await solver.SolutionsAsync().ShouldBe(expected); }); }
public async Task Can_Solve_Puzzle_With_Visualization() { // Arrange string year = "2016"; string day = "8"; var browser = new BrowserFixture(OutputHelper); await browser.WithPageAsync(async (page) => { PuzzleSolver solver = await LoadApplication(page); await solver.SelectYearAsync(year); await solver.SelectDayAsync(day); string input = await GetPuzzleInputAsync(year, day); await solver.SelectInputAsync(input); // Act await solver.SolveAsync(); // Assert await solver.SolutionsAsync().ShouldBe(new[] { "121", "RURUCEOEIL" }); await solver.VisualizationsAsync().ShouldBe(1); }); }