public void TestPrimativeArray()
        {
            Prim p = new Prim { Values = new[] { "abc", "def", "ghi", "jkl" } },
                clone = Serializer.DeepClone(p);

            string[] oldArr = p.Values, newArr = clone.Values;
            Assert.AreEqual(oldArr.Length, newArr.Length);
            for (int i = 0; i < oldArr.Length; i++)
            {
                Assert.AreEqual(oldArr[i], newArr[i], "Item " + i.ToString());
            }
        }
        public void TestPrimativeArray()
        {
            Prim p = new Prim {
                Values = new[] { "abc", "def", "ghi", "jkl" }
            },
                 clone = Serializer.DeepClone(p);

            string[] oldArr = p.Values, newArr = clone.Values;
            Assert.Equal(oldArr.Length, newArr.Length);
            for (int i = 0; i < oldArr.Length; i++)
            {
                Assert.Equal(oldArr[i], newArr[i]); //, "Item " + i.ToString());
            }
        }
Exemple #3
0
        public void TestPrimativeArray()
        {
            var  schema = RuntimeTypeModel.Default.GetDebugSchema(typeof(Prim));
            Prim p      = new Prim {
                Values = new[] { "abc", "def", "ghi", "jkl" }
            },
                 clone = Serializer.DeepClone(p);

            string[] oldArr = p.Values, newArr = clone.Values;
            Assert.AreEqual(oldArr.Length, newArr.Length);
            for (int i = 0; i < oldArr.Length; i++)
            {
                Assert.AreEqual(oldArr[i], newArr[i], "Item " + i.ToString());
            }
        }