Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

some thing wrong in this example #18

Open
sgf opened this issue Nov 28, 2022 · 1 comment
Open

some thing wrong in this example #18

sgf opened this issue Nov 28, 2022 · 1 comment

Comments

@sgf
Copy link

sgf commented Nov 28, 2022

    public class CBase<TKey>
    {
        public TKey Id { get; set; }
    }


    public class C3 : CBase<int>
    {
        public new int Id { get; set; }
    }

    public class C2 : CBase<int>
    {

        public C3 c3 { get; set; } = new();
    }

    public class C1 : CBase<int>
    {
        public C2 c2 { get; set; } = new();
    }

    public class CloneAndDiffTest : TestBase
    {

        [Fact]
        public void TestClone()
        {
            var org = Fixture.Create<C1>();
            var c1 = FastDeepCloner.DeepCloner.Clone(org);
            var c2 = AnyClone.CloneExtensions.Clone(org);// pst.MapClone();
            var diffs_0 = org.Diff(c1);
            var diffs_1 = org.Diff(c2);
    }
  }
@sgf
Copy link
Author

sgf commented Nov 28, 2022

diffs_1 has not some different value

im using AnyDiff to get the different fields

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant