BoDi.Tests.RegisterTypeTests.ShouldRegisterGenericTypeDefinitions C# (CSharp) Méthode

ShouldRegisterGenericTypeDefinitions() private méthode

private ShouldRegisterGenericTypeDefinitions ( ) : void
Résultat 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);
        }