示例#1
0
        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 ShouldReverseLinkedList()
        {
            var expectedOutputs = new List <int>()
            {
                3, 2, 1
            };
            IConsoleWriter writerMock = MockWriter.GetInstance(expectedOutputs);

            LinkedListDS linkedList = GetLinkedList(writerMock);

            linkedList.Reverse();

            linkedList.Result();
        }