BTDBTest.IocTests.UsingConstructorWorks C# (CSharp) Method

UsingConstructorWorks() private method

private UsingConstructorWorks ( ) : void
return void
        public void UsingConstructorWorks()
        {
            var builder = new ContainerBuilder();
            builder.RegisterInstance((object)7).Named<int>("i");
            builder.RegisterInstance((object)3).Named<int>("j");
            builder.RegisterInstance((object)"A").Named<string>("s");
            builder.RegisterType<MultipleConstructors>().Keyed<MultipleConstructors>(1);
            builder.RegisterType<MultipleConstructors>().UsingConstructor().Keyed<MultipleConstructors>(2);
            builder.RegisterType<MultipleConstructors>().UsingConstructor(typeof(int)).Keyed<MultipleConstructors>(3);
            builder.RegisterType<MultipleConstructors>().UsingConstructor(typeof(string)).Keyed<MultipleConstructors>(4);
            builder.RegisterType<MultipleConstructors>().UsingConstructor(typeof(int), typeof(int)).Keyed<MultipleConstructors>(5);
            var container = builder.Build();
            Assert.Equal("Int 7, Int 3", container.ResolveKeyed<MultipleConstructors>(1).Desc);
            Assert.Equal("", container.ResolveKeyed<MultipleConstructors>(2).Desc);
            Assert.Equal("Int 7", container.ResolveKeyed<MultipleConstructors>(3).Desc);
            Assert.Equal("String A", container.ResolveKeyed<MultipleConstructors>(4).Desc);
            Assert.Equal("Int 7, Int 3", container.ResolveKeyed<MultipleConstructors>(5).Desc);
        }
IocTests