Exemple #1
0
        public void GivenParticularValue_WhenDeleteFromLinkedList_ShouldReturnTheListSize()
        {
            LinkedListOperations list = new LinkedListOperations();

            list.AddAtLast(56); list.AddAtLast(30); list.AddAtLast(40); list.AddAtLast(70);
            int searchedValue = list.Search(40);

            list.DeleteNodeByValue(40, searchedValue);
            int expected = 3;

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