Example #1
0
    public void Deep_Clone_Ref_Properties()
    {
        var test1 = new Test1 {
            MyTest1 = new Test1(), MyTest2 = new Test2()
        };

        var clone = (Test1)test1.DeepClone();

        Assert.AreNotSame(test1, clone);
        Assert.AreNotSame(test1.MyTest1, clone.MyTest1);
        Assert.AreSame(test1.MyTest2, clone.MyTest2);
    }