BoDi.Tests.RegisterFromConfigTests.ShouldResolveFromCustomSection C# (CSharp) Method

ShouldResolveFromCustomSection() private method

private ShouldResolveFromCustomSection ( ) : void
return void
        public void ShouldResolveFromCustomSection()
        {
            // given
            var section = (TestConfigSection)ConfigurationManager.GetSection("testSection");
            Assert.IsNotNull(section);

            var container = new ObjectContainer();
            container.RegisterFromConfiguration(section.Dependencies);

            // when

            var obj = container.Resolve<IInterface1>();

            // then

            Assert.IsNotNull(obj);
            Assert.IsInstanceOf(typeof(VerySimpleClass), obj);
        }