<commit_before>﻿using System.Linq;
using System.Reflection;
using FluentAssertions.Execution;

namespace FluentAssertions.Ioc.Ninject
{
    public class AssemblyAssertions
    {
        protected internal AssemblyAssertions(Assembly assembly)
        {
            Subject = assembly;
        }

        public Assembly Subject { get; private set; }

        public void NotReference(Assembly assembly)
        {
            var subjectName = Subject.GetName().Name;
            var assemblyName = assembly.GetName().Name;

            var references = Subject.GetReferencedAssemblies().Select(x => x.Name);

            Execute.Assertion
                .ForCondition(!references.Any(x => x == assemblyName))
                .FailWith("Assembly {0} should not reference assembly {1}", subjectName, assemblyName);
        }
    }
}<commit_msg>Added NotReference overload with reason, and xml comments.<commit_after>﻿using System;
using System.Linq;
using System.Reflection;
using FluentAssertions.Execution;

namespace FluentAssertions.Ioc.Ninject
{
    public class AssemblyAssertions
    {
        protected internal AssemblyAssertions(Assembly assembly)
        {
            Subject = assembly;
        }

        public Assembly Subject { get; private set; }

        /// <summary>
        /// Asserts that an assembly does not reference the specified assembly.
        /// </summary>
        /// <param name="assembly">The assembly which should not be referenced.</param>
        public void NotReference(Assembly assembly)
        {
            NotReference(assembly, String.Empty);
        }

        /// <summary>
        /// Asserts that an assembly does not reference the specified assembly.
        /// </summary>
        /// <param name="assembly">The assembly which should not be referenced.</param>
        /// <param name="reason">
        /// A formatted phrase as is supported by <see cref="string.Format(string,object[])" /> explaining why the assertion 
        /// is needed. If the phrase does not start with the word <i>because</i>, it is prepended automatically.
        /// </param>
        /// <param name="reasonArgs">
        /// Zero or more objects to format using the placeholders in <see cref="reason" />.
        /// </param>
        public void NotReference(Assembly assembly, string reason, params string[] reasonArgs)
        {
            var subjectName = Subject.GetName().Name;
            var assemblyName = assembly.GetName().Name;

            var references = Subject.GetReferencedAssemblies().Select(x => x.Name);

            Execute.Assertion
                   .BecauseOf(reason, reasonArgs)
                   .ForCondition(!references.Any(x => x == assemblyName))
                   .FailWith("Assembly {0} should not reference assembly {1}{reason}", subjectName, assemblyName);
        }
    }
}
{'fraction_non_alphanumeric': 0.10330288123682362, 'fraction_numerical': 0.0014054813773717498, 'mean_word_length': 2.2686567164179103, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 23, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, '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': '1559341', 'n_tokens_mistral': 699, 'n_tokens_neox': 674, 'n_words': 209}