<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Jwc.Experiment;
using Ploeh.AutoFixture.Xunit;
using Xunit;
using Xunit.Extensions;

namespace NuGet.Jwc.Experiment
{
    public class Scenario
    {
        [Test]
        public void TheoremSupportsNonParameterizedTest()
        {
            Assert.True(true, "executed.");
        }

        [Test]
        [InlineData("expected", 1234)]
        [ParameterizedTestData]
        public void TheoremSupportsParameterizedTest(string arg1, int arg2)
        {
            Assert.Equal("expected", arg1);
            Assert.Equal(1234, arg2);
        }

        [Test]
        public void TheoremSupportsParameterizedTestWithAutoData(
            string arg1, Type arg2)
        {
            Assert.NotNull(arg1);
            Assert.NotNull(arg2);
        }

        [Test]
        [InlineData("expected")]
        public void TheoremSupportsParameterizedTestWithMixedData(
            string arg1, object arg2)
        {
            Assert.Equal("expected", arg1);
            Assert.NotNull(arg2);
        }

        [Test]
        public void TheoremSupportsFrozenAttributeOfAutoFixtureXunit(
            [Frozen] string arg1, string arg2)
        {
            Assert.Same(arg1, arg2);
        }

        [Test]
        public void TheoremSupportsModestAttributeOfAutoFixtureXunit(
            [Modest] Person person)
        {
            Assert.Null(person.Name);
            Assert.Equal(0, person.Age);
        }

        [Test]
        public void TheoremSupportsGreedyAttributeOfAutoFixtureXunit(
            [Frozen] string name,
            [Frozen] int age,
            [Greedy] Person person)
        {
            Assert.Same(name, person.Name);
            Assert.Equal(age, person.Age);
        }

        [FirstClassTest]
        public IEnumerable<ITestCase> FirstClassTheoremSupportsManyTestCases()
        {
            var testCases = new[]
            {
                new { X = 1, Y = 2, Z = 3 },
                new { X = 3, Y = 7, Z = 10 },
                new { X = 100, Y = 23, Z = 123 }
            };

            return testCases.Select(
                tc => new TestCase(
                    () => Assert.Equal(tc.Z, tc.X + tc.Y)));
        }
<commit_msg>refactor: slightly reformats.<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using Jwc.Experiment;
using Ploeh.AutoFixture.Xunit;
using Xunit;
using Xunit.Extensions;

namespace NuGet.Jwc.Experiment
{
    public class Scenario
    {
        [Test]
        public void TheoremSupportsNonParameterizedTest()
        {
            Assert.True(true, "executed.");
        }

        [Test]
        [InlineData("expected", 1234)]
        [ParameterizedTestData]
        public void TheoremSupportsParameterizedTest(string arg1, int arg2)
        {
            Assert.Equal("expected", arg1);
            Assert.Equal(1234, arg2);
        }

        [Test]
        public void TheoremSupportsParameterizedTestWithAutoData(
            string arg1, Type arg2)
        {
            Assert.NotNull(arg1);
            Assert.NotNull(arg2);
        }

        [Test]
        [InlineData("expected")]
        public void TheoremSupportsParameterizedTestWithMixedData(
            string arg1, object arg2)
        {
            Assert.Equal("expected", arg1);
            Assert.NotNull(arg2);
        }

        [Test]
        public void TheoremSupportsFrozenAttributeOfAutoFixtureXunit(
            [Frozen] string arg1, string arg2)
        {
            Assert.Same(arg1, arg2);
        }

        [Test]
        public void TheoremSupportsModestAttributeOfAutoFixtureXunit(
            [Modest] Person person)
        {
            Assert.Null(person.Name);
            Assert.Equal(0, person.Age);
        }

        [Test]
        public void TheoremSupportsGreedyAttributeOfAutoFixtureXunit(
            [Frozen] string name,
            [Frozen] int age,
            [Greedy] Person person)
        {
            Assert.Same(name, person.Name);
            Assert.Equal(age, person.Age);
        }

        [FirstClassTest]
        public IEnumerable<ITestCase> FirstClassTheoremSupportsManyTestCases()
        {
            var testCases = new[]
            {
                new { X = 1, Y = 2, Z = 3 },
                new { X = 3, Y = 7, Z = 10 },
                new { X = 100, Y = 23, Z = 123 }
            };

            return testCases.Select(
                c => new TestCase(() => Assert.Equal(c.Z, c.X + c.Y)));
        }

{'fraction_non_alphanumeric': 0.0965847291711986, 'fraction_numerical': 0.01740265390472047, 'mean_word_length': 1.6810495626822157, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 9, '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': '927166', 'n_tokens_mistral': 1360, 'n_tokens_neox': 1290, 'n_words': 276}