Example #1
0
        public void PolymorphicRoot([Values] RecorderMode mode)
        {
            BaseType root         = new DerivedType();
            var      deserialized = DoRecorderRoundTrip(root, mode);

            Assert.AreEqual(root.GetType(), deserialized.GetType());
        }
Example #2
0
        public void DerivedConverterTest([ValuesExcept(RecorderMode.Validation)] RecorderMode mode)
        {
            Dec.Config.TestParameters = new Dec.Config.UnitTestParameters {
                explicitConverters = new Type[] { typeof(DerivedConverter) }
            };

            // we're only doing this to kick off the converter init
            new Dec.Parser().Finish();

            BaseType root         = new DerivedType();
            var      deserialized = DoRecorderRoundTrip(root, mode);

            Assert.AreEqual(root.GetType(), deserialized.GetType());
        }