BTDBTest.IocTests.ResolvingHardCycleShouldThrowException C# (CSharp) Method

ResolvingHardCycleShouldThrowException() private method

private ResolvingHardCycleShouldThrowException ( ) : void
return void
        public void ResolvingHardCycleShouldThrowException()
        {
            var builder = new ContainerBuilder();
            builder.RegisterType<HardCycle1>().As<ICycle1>().SingleInstance();
            builder.RegisterType<HardCycle2>().As<ICycle2>().SingleInstance();
            var container = builder.Build();
            Assert.Throws<InvalidOperationException>(() => container.Resolve<ICycle1>());
        }
IocTests