BoDi.Tests.RegisterTypeTests.ShouldRegisterGenericTypeDefinitions C# (CSharp) Метод

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

private ShouldRegisterGenericTypeDefinitions ( ) : void
Результат 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);
        }