Example #1
0
        public void TestClassMemberWithInheritance()
        {
            var settings = new SerializerSettings()
            {
                LimitPrimitiveFlowSequence = 0
            };

            settings.RegisterTagMapping("ClassMemberWithInheritance", typeof(ClassMemberWithInheritance));
            settings.RegisterTagMapping("MemberInterface", typeof(MemberInterface));
            settings.RegisterTagMapping("MemberObject", typeof(MemberObject));
            var original = new ClassMemberWithInheritance();
            var obj      = SerialRoundTrip(settings, original);

            Assert.True(obj is ClassMemberWithInheritance);
            Assert.AreEqual(original, obj);
        }
Example #2
0
 protected bool Equals(ClassMemberWithInheritance other)
 {
     return(Equals(ThroughObject, other.ThroughObject) && Equals(ThroughInterface, other.ThroughInterface) && Equals(ThroughBase, other.ThroughBase) && Equals(Direct, other.Direct));
 }