doubly linked list using NUnit RRS feed

  • Question

  • User103755304 posted

    Hi all

    I had problem in NUnit, Can any one help to solve the problem .


    Please to find the below Code. Right the Test case for the code

    Test :1

    Node is a Class in a Java or C# program. Node has been designed to be used in a doubly linked list. It has the following methods

    void Node next()
    void Node prev()

    to allow traversal of the doubly linked list in both directions. It also has methods that allow a programmer to insert into the doubly linked list

    void insertAfter(Node that)


    Write a suite of unit test methods to assert "insertAfter(...)"


    Saturday, March 6, 2010 10:53 AM

All replies

  • User-319574463 posted

    You would need to set up a test like this:

    1. Create a list of 2 items
    2. Iterate thought the list to prove the base line.
    3. Call Insert after to insert after the first node
    4. Iterate thought the list and the new node should appear in the list
    Saturday, March 20, 2010 9:43 AM