Esempio n. 1
0
        //this method test Clear() method
        public void PushStart12345_0returned()
        {
            int expected = 0;

            simple_ds.Structures.LinkedList <int> list = new simple_ds.Structures.LinkedList <int>();

            for (var number = 1; number <= 5; ++number)
            {
                list.PushStart(number);
            }

            list.Clear();

            Assert.AreEqual(expected, list.Size());
        }
Esempio n. 2
0
        //this method test PushBack() method
        public void PushBack123_1returned()
        {
            int expected      = 1;
            int expected_size = 3;
            int list_buffer;

            simple_ds.Structures.LinkedList <int> list = new simple_ds.Structures.LinkedList <int>();

            for (var number = 1; number <= 3; ++number)
            {
                list.PushBack(number);
            }

            list_buffer = list.PeekHead();

            Assert.AreEqual(expected, list_buffer);
            Assert.AreEqual(expected_size, list.Size());
        }