Arc.Integration.Tests.Infrastructure.Dependencies.AutoRegistrationTests.Should_bind_all_types_with_singleton_scope C# (CSharp) Метод

Should_bind_all_types_with_singleton_scope() приватный Метод

private Should_bind_all_types_with_singleton_scope ( ) : void
Результат void
        public void Should_bind_all_types_with_singleton_scope()
        {
            var configuration = AutoRegistration.For("Arc.Integration.Tests")
                .AllConcreteTypes
                .BindToFirstInterface()
                .Using(ServiceLifeStyle.Singleton);

            SetupConfiguration(configuration);
            var first = _serviceLocator.Resolve<IService>();
            var second = _serviceLocator.Resolve<IService>();

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