Пример #1
0
        public void GetWorksAfterInsert()
        {
            var _hasInitialValue = new DataStructure.CustomLinkedList("Hello");

            _hasInitialValue.Add("My");
            _hasInitialValue.Insert("World", 1);
            _hasInitialValue.Add("Is");
            _hasInitialValue.Insert("Name", 3);
            Assert.Equal(_hasInitialValue.Get(1), "World");
            Assert.Equal(_hasInitialValue.Get(3), "Name");
        }
Пример #2
0
        public void InsertFunctionWorks()
        {
            var _hasInitialValue = new DataStructure.CustomLinkedList("Hello");

            _hasInitialValue.Insert("World", 1);
            Assert.Equal(_hasInitialValue.Length(), 2);
        }