Exemple #1
0
    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);
        });
    }