Пример #1
0
        public void TestDeepClone()
        {
            TaskItem parent = new TaskItem("foo", "bar.proj");

            parent.SetMetadata("a", "b");
            parent.SetMetadata("c", "d");

            TaskItem clone = parent.DeepClone();

            Assert.True(parent.Equals(clone));                   // "The parent and the clone should be equal"
            Assert.False(object.ReferenceEquals(parent, clone)); // "The parent and the child should not be the same object"
        }
Пример #2
0
        public void TestEquivalenceIdentity()
        {
            TaskItem left = new TaskItem("foo", "bar.proj");

            Assert.True(left.Equals(left));
        }