<commit_before>﻿// <copyright>
// Copyright (c) <NAME>. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
// </copyright>

namespace Media.Specifications
{
    using Fixie;
    using FixieSpec;

    public class SpecificationConvention : Convention
    {
        public SpecificationConvention()
        {
            Classes
                .Where(type => type.HasOnlyDefaultConstructor() || type.HasOnlyParameterConstructor());
        }
    }
}<commit_msg>Preparation steps in the sample specifications to create SUT and dependencies using AutoFixture<commit_after>﻿// <copyright>
// Copyright (c) <NAME>. All rights reserved.
// Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
// </copyright>

namespace Media.Specifications
{
    using System;

    using Fixie;
    using FixieSpec;
    using Ploeh.AutoFixture.Kernel;
    using Fixture = Ploeh.AutoFixture.Fixture;


    public class SpecificationConvention : Convention
    {
        public SpecificationConvention()
        {
            Classes
                .Where(type => type.HasOnlyDefaultConstructor() || type.HasOnlyParameterConstructor());

            ClassExecution
                .UsingFactory(CreateFromFixture);
        }

        object CreateFromFixture(Type type)
        {
            var fixture = new Fixture();

            return new SpecimenContext(fixture).Resolve(type);
        }
    }
}
{'fraction_non_alphanumeric': 0.08637873754152824, 'fraction_numerical': 0.0, 'mean_word_length': 2.5602836879432624, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '2399958', 'n_tokens_mistral': 386, 'n_tokens_neox': 371, 'n_words': 113}