Skip to content

Type include interface field  #16

@tangdf

Description

@tangdf
        private class MyClass
        {
            public readonly ICollection<string> Collection = new List<string>();
        }

        [Fact]
        public void CanCopyInterfaceField()
        {
            MyClass original = new MyClass();

            original.Collection.Add("A");

            var result = DeepCopier.Copy(original);

            Assert.NotSame(original, result); //Failure
            Assert.NotSame(original.Collection, result.Collection); //Failure
        }

The result is failure.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions