<commit_before>﻿// Copyright (c) <NAME>, 2015. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.

namespace MartinCostello.AdventOfCode.Puzzles
{
    using Xunit;

    /// <summary>
    /// A class containing methods for helping to test puzzles. This class cannot be inherited.
    /// </summary>
    internal static class PuzzleTestHelpers
    {
        /// <summary>
        /// Solves the specified puzzle type.
        /// </summary>
        /// <typeparam name="T">The type of the puzzle to solve.</typeparam>
        /// <returns>
        /// The solved puzzle of the type specified by <typeparamref name="T"/>.
        /// </returns>
        internal static T SolvePuzzle<T>()
            where T : IPuzzle, new()
        {
            return SolvePuzzle<T>(new string[0]);
        }

        /// <summary>
        /// Solves the specified puzzle type with the specified arguments.
        /// </summary>
        /// <typeparam name="T">The type of the puzzle to solve.</typeparam>
        /// <param name="args">The arguments to pass to the puzzle.</param>
        /// <returns>
        /// The solved puzzle of the type specified by <typeparamref name="T"/>.
        /// </returns>
        internal static T SolvePuzzle<T>(string[] args)
            where T : IPuzzle, new()
        {
            // Arrange
            T puzzle = new T();

            // Act
            int result = puzzle.Solve(args);

            // Assert
            Assert.Equal(0, result);

            return puzzle;
        }
    }
}<commit_msg>Support params usage as input for tests<commit_after>// Copyright (c) <NAME>, 2015. All rights reserved.
// Licensed under the Apache 2.0 license. See the LICENSE file in the project root for full license information.

namespace MartinCostello.AdventOfCode.Puzzles
{
    using Xunit;

    /// <summary>
    /// A class containing methods for helping to test puzzles. This class cannot be inherited.
    /// </summary>
    internal static class PuzzleTestHelpers
    {
        /// <summary>
        /// Solves the specified puzzle type.
        /// </summary>
        /// <typeparam name="T">The type of the puzzle to solve.</typeparam>
        /// <returns>
        /// The solved puzzle of the type specified by <typeparamref name="T"/>.
        /// </returns>
        internal static T SolvePuzzle<T>()
            where T : IPuzzle, new()
        {
            return SolvePuzzle<T>(new string[0]);
        }

        /// <summary>
        /// Solves the specified puzzle type with the specified arguments.
        /// </summary>
        /// <typeparam name="T">The type of the puzzle to solve.</typeparam>
        /// <param name="args">The arguments to pass to the puzzle.</param>
        /// <returns>
        /// The solved puzzle of the type specified by <typeparamref name="T"/>.
        /// </returns>
        internal static T SolvePuzzle<T>(params string[] args)
            where T : IPuzzle, new()
        {
            // Arrange
            T puzzle = new T();

            // Act
            int result = puzzle.Solve(args);

            // Assert
            Assert.Equal(0, result);

            return puzzle;
        }
    }
}
{'fraction_non_alphanumeric': 0.12170447578172901, 'fraction_numerical': 0.004904966278356836, 'mean_word_length': 1.7146422628951747, 'pattern_counts': {'":': 0, '<': 47, '<?xml version=': 0, '>': 47, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4039178', 'n_tokens_mistral': 869, 'n_tokens_neox': 829, 'n_words': 309}