Example #1
0
        public void AttachBeforeSetsPreviousOfSource()
        {
            TestNodeA.AttachBefore(TestNodeB);

            TestObject.AttachBefore(TestNodeB);

            Assert.AreSame(TestNodeA, TestObject.Previous);
        }
Example #2
0
        public void CannotAttachBeforeNodeOfDifferentParent()
        {
            object             otherParent = new object();
            DualLinkNode <int> otherNode   = new DualLinkNode <int>(otherParent, TestInt);

            TestObject.AttachBefore(otherNode);
        }