public void GetLength_ThrowsError_ForKnottedList() { var head = new LinkedListNode <int>(1); head.Next = head; Assert.Throws <InvalidOperationException>(() => head.GetLength()); }
protected override int?OnInitComplexity(LinkedListNode <int> arg) { if (arg == null) { throw new ArgumentNullException("arg"); } return(arg.GetLength()); }
protected override int?OnInitComplexity(LinkedListNode <int> arg) { return(arg.GetLength()); }