static void Main(string[] args) { Write("Beginning..."); BiLinkedList <int> list = new BiLinkedList <int>(); list.ToList(); Console.ReadLine(); }
public void Add_5_NextFor4Is5() { // arrange BiLinkedList <int> llist = new BiLinkedList <int>(); // act for (int i = 0; i < 5; i++) { llist.Add(i); } llist.Add(5); var node = llist.Get(4); int actual = node.Next.Data; int expected = 5; // assert Assert.AreEqual(expected, actual); }
public void Add_5_NextIsNull() { // arrange BiLinkedList <int> llist = new BiLinkedList <int>(); // act for (int i = 0; i < 5; i++) { llist.Add(i); } llist.Add(5); var node = llist.Get(5); int?actual = node.Next?.Data; int?expected = null; // assert Assert.AreEqual(expected, actual); }
public void Add_5_PreviousIs4() { // arrange BiLinkedList <int> llist = new BiLinkedList <int>(); // act for (int i = 0; i < 5; i++) { llist.Add(i); } llist.Add(5); var node = llist.Get(5); int actual = node.Previous.Data; int expected = 4; // assert Assert.AreEqual(expected, actual); }