public void InjectionOfNonResolvableTypeShouldFail()
        {
            SimpleContainer c = new SimpleContainer();

            Assert.ThrowsException <ArgumentException>(() =>
            {
                ClassWithStringProperty a = c.Resolve <ClassWithStringProperty>();
            });
        }
        public void BuildUpOfNonResolvableTypeShouldFail()
        {
            SimpleContainer c = new SimpleContainer();

            ClassWithStringProperty a = new ClassWithStringProperty();

            Assert.ThrowsException <ArgumentException>(() =>
            {
                c.BuildUp(a);
            });
        }
        public void InjectionOfTypeRegisteredBefore()
        {
            SimpleContainer c = new SimpleContainer();

            string s = "abc";

            c.RegisterInstance <string>(s);

            ClassWithStringProperty a = c.Resolve <ClassWithStringProperty>();

            Assert.AreEqual(a.TheString, s);
        }
        public void BuldUpOfTypeRegisteredBefore()
        {
            SimpleContainer c = new SimpleContainer();

            string s = "abc";

            c.RegisterInstance <string>(s);

            ClassWithStringProperty a = new ClassWithStringProperty();

            c.BuildUp(a);

            Assert.AreEqual(a.TheString, s);
        }