<commit_before>namespace FakeItEasy.Tests
{
    using System;
    using System.Collections.Generic;
    using System.Diagnostics.CodeAnalysis;
    using System.Linq;
    using FakeItEasy.Creation;
    using FakeItEasy.Expressions;
    using FluentAssertions;
    using NUnit.Framework;

    [TestFixture]
    public class ServiceLocatorTests
    {
        [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields", Justification = "Used reflectively.")]
        private readonly Type[] singletonTypes =
        {
            typeof(IExpressionCallMatcherFactory),
            typeof(ExpressionArgumentConstraintFactory),
            typeof(IProxyGenerator)
        };

        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Used reflectively.")]
        private IEnumerable<Type> NonSingletonTypes
        {
            get { return Enumerable.Empty<Type>(); }
        }

        [Test]
        public void Current_should_not_be_null()
        {
            ServiceLocator.Current.Should().NotBeNull();
        }

        [Test]
        public void Should_be_registered_as_singleton([ValueSource("singletonTypes")] Type type)
        {
            var first = ServiceLocator.Current.Resolve(type);
            var second = ServiceLocator.Current.Resolve(type);

            second.Should().BeSameAs(first);
        }

        [Test]
        public void Should_be_registered_as_non_singleton([ValueSource("NonSingletonTypes")] Type type)
        {
            var first = ServiceLocator.Current.Resolve(type);
            var second = ServiceLocator.Current.Resolve(type);

            second.Should().NotBeSameAs(first);
        }
    }
}<commit_msg>Add test cases for Should_be_registered_as_non_singleton<commit_after>namespace FakeItEasy.Tests
{
    using System;
    using System.Collections.Generic;
    using System.Diagnostics.CodeAnalysis;
    using FakeItEasy.Core;
    using FakeItEasy.Creation;
    using FakeItEasy.Expressions;
    using FluentAssertions;
    using NUnit.Framework;

    [TestFixture]
    public class ServiceLocatorTests
    {
        [SuppressMessage("Microsoft.Performance", "CA1823:AvoidUnusedPrivateFields", Justification = "Used reflectively.")]
        private static IEnumerable<Type> SingletonTypes
        {
            get
            {
                yield return typeof(IExpressionCallMatcherFactory);
                yield return typeof(ExpressionArgumentConstraintFactory);
                yield return typeof(IProxyGenerator);
            }
        }

        [SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Justification = "Used reflectively.")]
        private static IEnumerable<Type> NonSingletonTypes
        {
            get
            {
                yield return typeof(IFakeCreatorFacade);
                yield return typeof(IFakeAndDummyManager);
                yield return typeof(IFixtureInitializer);
            }
        }

        [Test]
        public void Current_should_not_be_null()
        {
            ServiceLocator.Current.Should().NotBeNull();
        }

        [Test]
        public void Should_be_registered_as_singleton([ValueSource(nameof(SingletonTypes))] Type type)
        {
            var first = ServiceLocator.Current.Resolve(type);
            var second = ServiceLocator.Current.Resolve(type);

            second.Should().BeSameAs(first);
        }

        [Test]
        public void Should_be_registered_as_non_singleton([ValueSource(nameof(NonSingletonTypes))] Type type)
        {
            var first = ServiceLocator.Current.Resolve(type);
            var second = ServiceLocator.Current.Resolve(type);

            second.Should().NotBeSameAs(first);
        }
    }
}
{'fraction_non_alphanumeric': 0.08610151474887058, 'fraction_numerical': 0.004251926654265214, 'mean_word_length': 2.4595588235294117, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '405406', 'n_tokens_mistral': 1010, 'n_tokens_neox': 977, 'n_words': 171}