public void AddFirstできる() { linkedList.AddFirst(300); Assert.AreEqual(1, linkedList.Count); Assert.AreEqual(300, linkedList.First.Value); Assert.AreEqual(300, linkedList.Last.Value); linkedList.AddLast(600); Assert.AreEqual(2, linkedList.Count); linkedList.AddFirst(100); Assert.AreEqual(100, linkedList.First.Value); Assert.AreEqual(600, linkedList.Last.Value); AssertExtensions.AreEqual(new[] { 100, 300, 600 }, linkedList); }
public void AddFirstTest2() { for (var number = 1; number <= dataNumber; number++) { linkedList2.AddFirst(number); } }