public void AddAfterできる() { linkedList = new ShosLinkedList <int> { 10 }; linkedList.AddAfter(linkedList.First, 70); AssertExtensions.AreEqual(new[] { 10, 70 }, linkedList); linkedList.AddAfter(linkedList.Last, 40); AssertExtensions.AreEqual(new[] { 10, 70, 40 }, linkedList); var node = linkedList.Find(70); linkedList.AddAfter(node, 100); AssertExtensions.AreEqual(new[] { 10, 70, 100, 40 }, linkedList); }
public void AddAfterでnullを渡すと例外が飛ぶ() => linkedList.AddAfter(null, 60);