Arc.Integration.Tests.Infrastructure.Dependencies.BaseServiceLocatorTests.Should_register_to_factory_method_with_singleton_scope C# (CSharp) Method

Should_register_to_factory_method_with_singleton_scope() private method

        public void Should_register_to_factory_method_with_singleton_scope()
        {
            var target = CreateSUT();

            target.Register(
                Requested.Service<IServiceFactory>()
                    .IsImplementedBy<ServiceFactoryImpl>(),

                Requested.Service<IParameterlessService>()
                    .IsConstructedBy(x => x.Resolve<IServiceFactory>().Create())
                    .LifeStyle.IsSingelton()
                );

            var first = target.Resolve<IParameterlessService>();
            var second = target.Resolve<IParameterlessService>();

            Assert.That(first, Is.Not.Null);
            Assert.That(second, Is.Not.Null);
            Assert.That(first, Is.SameAs(second));
        }