Beispiel #1
0
        public void SubSubtypeTest()
        {
            var expected = new SubtypeClass {
                Field = new SubSubclassC()
            };
            var actual = Roundtrip(expected);

            Assert.AreEqual(SubclassType.C, actual.Subtype);
            Assert.IsInstanceOfType(actual.Field, typeof(SubSubclassC));
        }
Beispiel #2
0
        public void SubtypeTest()
        {
            var expected = new SubtypeClass {
                Field = new SubclassB {
                    SomethingForClassB = 33
                }
            };
            var actual = Roundtrip(expected);

            Assert.AreEqual(SubclassType.B, actual.Subtype);
            Assert.IsInstanceOfType(actual.Field, typeof(SubclassB));
        }