static void Main(string[] args) { var list = new LinkedListDS(); list.Add(1); list.Add(2); list.Add(3); list.Reverse(); list.Result(); Console.WriteLine("completed"); }
public void ShouldPrintLinkedList() { var expectedOutputs = new List <int>() { 1, 2, 3 }; IConsoleWriter writerMock = MockWriter.GetInstance(expectedOutputs); LinkedListDS linkedList = GetLinkedList(writerMock); linkedList.Result(); }
public void ShouldAddNodeAfterGivenValue() { var expectedOutputs = new List <int>() { 1, 2, 4, 3 }; IConsoleWriter writerMock = MockWriter.GetInstance(expectedOutputs); LinkedListDS linkedList = GetLinkedList(writerMock); linkedList.AddNodeAfter(2, 4); linkedList.Result(); }