Ejemplo n.º 1
0
        public void TestTagWithInferenceBinary()
        {
            TagData data = new TagData
            {
                Bravo   = 15,
                Charlie = 17,
                Delta   = 4,
                Zulu    = 9
            };

            RuntimeTypeModel tm = TypeModel.Create();

            // for compatibility with DataMember
            //tm.SkipForcedAdvancedVersioning = true;

            var first  = tm.GetDebugSchema(typeof(TagData));
            var second = tm.GetDebugSchema(typeof(TagDataExpected));

            TagDataExpected clone = tm.ChangeType <TagData, TagDataExpected>(data);

            Assert.AreEqual(data.Bravo, clone.Bravo, "Bravo");
            Assert.AreEqual(data.Charlie, clone.Charlie, "Charlie");
            Assert.AreEqual(data.Delta, clone.Delta, "Delta");
            Assert.AreEqual(data.Zulu, clone.Zulu, "Zulu");
        }
 public void TestTagWithInferenceBinary()
 {
     TagData data = new TagData
     {
         Bravo = 15,
         Charlie = 17,
         Delta = 4,
         Zulu = 9
     };
     TagDataExpected clone = Serializer.ChangeType<TagData, TagDataExpected>(data);
     Assert.Equal(data.Bravo, clone.Bravo); //, "Bravo");
     Assert.Equal(data.Charlie, clone.Charlie); //, "Charlie");
     Assert.Equal(data.Delta, clone.Delta); //, "Delta");
     Assert.Equal(data.Zulu, clone.Zulu); //, "Zulu");
 }