예제 #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");
        }
예제 #2
0
        public void ShouldPrintLinkedList()
        {
            var expectedOutputs = new List <int>()
            {
                1, 2, 3
            };
            IConsoleWriter writerMock = MockWriter.GetInstance(expectedOutputs);

            LinkedListDS linkedList = GetLinkedList(writerMock);

            linkedList.Result();
        }
예제 #3
0
        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();
        }