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)); }
public void GetIntersectionNode_ThrowsError_IfOtherListIsNull() { var list = new LinkedListNode <int>(1); Assert.Throws <ArgumentNullException>(() => list.GetIntersectionNode(null)); }