public void TestInheritance()
        {
            Interface2 i2 = TypeAccessor <Interface2> .Instance.Create();

            Interface1 i1 = i2;

            i1.Foo();
            i2.Foo();
            i2.Bar();

            i1.Name = "John";

            Assert.AreEqual("John", i1.Name);
            Assert.AreEqual("John", i2.Name);
        }
Exemplo n.º 2
0
        public void TestInheritance()
        {
            //TypeFactory.SaveTypes = true;

            Interface2 i2 = TypeAccessor <Interface2> .CreateInstance();

            Interface1 i1 = i2;

            i1.Foo();
            i2.Foo();
            i2.Bar();

            i1.Name = "John";

            Assert.AreEqual("John", i1.Name);
            Assert.AreEqual("John", i2.Name);
        }