BoDi.Tests.RegisterTypeTests.ShouldRegisterGenericTypeDefinitions C# (CSharp) Method

ShouldRegisterGenericTypeDefinitions() private method

private ShouldRegisterGenericTypeDefinitions ( ) : void
return void
        public void ShouldRegisterGenericTypeDefinitions()
        {
            // given
            var container = new ObjectContainer();
            container.RegisterTypeAs(typeof(SimpleGenericClass<>), typeof(IGenericInterface<>));

            // when
            var obj = container.Resolve<IGenericInterface<VerySimpleClass>>();

            // then

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