Example #1
0
        public void ClassWithComplicatedFieldWithoutTypeRegistration()
        {
            SimpleContainer c = new SimpleContainer();

            Assert.ThrowsException <ArgumentException>(() =>
            {
                ClassWithComplicatedField a = c.Resolve <ClassWithComplicatedField>();
            });
        }
Example #2
0
        public void ClassWithComplicatedField()
        {
            SimpleContainer c = new SimpleContainer();

            c.RegisterType <IBaz, Baz>(false);
            ClassWithComplicatedField a = c.Resolve <ClassWithComplicatedField>();

            Assert.IsNotNull(a.cl.ibaz);
        }