コード例 #1
0
        public void MetaInitialization_Polymorphic_Initialized()
        {
            var polymorphic = new WithPolymorphic();
            Assert.AreEqual("UnitTest.WithPolymorphic", polymorphic._bond_meta);
            Assert.AreEqual("a", polymorphic.a);

            var derived = new DerivedPolymorphic();
            Assert.AreEqual("UnitTest.DerivedPolymorphic", derived._bond_meta);
            Assert.AreEqual("a", derived.a);
            Assert.AreEqual("b", derived.b);
        }
コード例 #2
0
        public void MetaInitialization_Polymorphic_Initialized()
        {
            var polymorphic = new WithPolymorphic();

            Assert.AreEqual("UnitTest.WithPolymorphic", polymorphic._bond_meta);
            Assert.AreEqual("a", polymorphic.a);

            var derived = new DerivedPolymorphic();

            Assert.AreEqual("UnitTest.DerivedPolymorphic", derived._bond_meta);
            Assert.AreEqual("a", derived.a);
            Assert.AreEqual("b", derived.b);
        }