示例#1
0
        public void GetIntersectionNode_ThrowsError_IfOtherListIsKnotted()
        {
            var list  = new LinkedListNode <int>(1);
            var other = new LinkedListNode <int>(2);

            other.Next = other;

            Assert.Throws <InvalidOperationException>(() => list.GetIntersectionNode(other));
        }
示例#2
0
        public void GetIntersectionNode_ThrowsError_IfOtherListIsNull()
        {
            var list = new LinkedListNode <int>(1);

            Assert.Throws <ArgumentNullException>(() => list.GetIntersectionNode(null));
        }