public void NullListIsNull() { LinkedList nullListOne = new LinkedList(); LinkedList nullListTwo = new LinkedList(); LinkedList MergeList = LLMerge.Merge(nullListOne, nullListTwo); Assert.Null(MergeList.Head); }
public void ReturnOtherListIfOneIsNull() { LinkedList nullListOne = new LinkedList(); LinkedList newestNotNullList = new LinkedList(); newestNotNullList.Includes(0); newestNotNullList.Includes(1); newestNotNullList.Includes(2); newestNotNullList.Includes(3); newestNotNullList.Includes(4); LinkedList MergeList = LLMerge.Merge(newestNotNullList, nullListOne); MergeList.Includes(0); MergeList.Includes(1); MergeList.Includes(2); MergeList.Includes(3); MergeList.Includes(4); Assert.Equal(newestNotNullList.ToString(), MergeList.ToString()); }
public void ReturnOneLinkedListIfOneIsNull() { LinkedList linkedListOne = new LinkedList(); linkedListOne.Includes(0); linkedListOne.Includes(1); linkedListOne.Includes(2); linkedListOne.Includes(3); linkedListOne.Includes(4); LinkedList nullList = new LinkedList(); LinkedList MergeList = LLMerge.Merge(linkedListOne, nullList); MergeList.Includes(0); MergeList.Includes(1); MergeList.Includes(2); MergeList.Includes(3); MergeList.Includes(4); Assert.Equal(linkedListOne.ToString(), MergeList.ToString()); }