Esempio n. 1
0
        public void TestEnumerable()
        {
            EnumWrapper obj   = new EnumWrapper();
            EnumWrapper clone = Serializer.DeepClone(obj);

            // the source object should have been read once, but not had any data added
            Assert.Equal(1, obj.SubData.IteratorCount); //, "obj IteratorCount");
            Assert.Equal(0, obj.SubData.Count);         //, "obj Count");
            Assert.Equal(0, obj.SubData.Sum);           //, "obj Sum");

            // the destination object should never have been read, but should have
            // had 5 values added
            Assert.Equal(0, clone.SubData.IteratorCount);       //, "clone IteratorCount");
            Assert.Equal(5, clone.SubData.Count);               //, "clone Count");
            Assert.Equal(1 + 2 + 3 + 4 + 5, clone.SubData.Sum); //, "clone Sum");
        }
Esempio n. 2
0
        public void TestEnumerable()
        {
            EnumWrapper obj = new EnumWrapper();
            var         tm  = TypeModel.Create();

            tm.SkipCompiledVsNotCheck = true;
            EnumWrapper clone = tm.DeepClone(obj);

            // the source object should have been read once, but not had any data added
            Assert.AreEqual(1, obj.SubData.IteratorCount, "obj IteratorCount");
            Assert.AreEqual(0, obj.SubData.Count, "obj Count");
            Assert.AreEqual(0, obj.SubData.Sum, "obj Sum");

            // the destination object should never have been read, but should have
            // had 5 values added
            Assert.AreEqual(0, clone.SubData.IteratorCount, "clone IteratorCount");
            Assert.AreEqual(5, clone.SubData.Count, "clone Count");
            Assert.AreEqual(1 + 2 + 3 + 4 + 5, clone.SubData.Sum, "clone Sum");
        }
Esempio n. 3
0
 public EnumParentStandardWrapper()
 {
     Wrapper = new EnumWrapper();
 }
Esempio n. 4
0
 public EnumParentGroupWrapper()
 {
     Wrapper = new EnumWrapper();
 }