not really known
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

38 lines
697 B

  1. package net.jrtechs.www.DataStructures;
  2. import static org.junit.Assert.assertNotNull;
  3. import static org.junit.Assert.assertTrue;
  4. import net.jrtechs.www.DataStructures.LinkedList.LinkedList;
  5. import org.junit.Test;
  6. public class NodeTest
  7. {
  8. /**
  9. * Rigorous Test :-)
  10. */
  11. @Test
  12. public void testCreation()
  13. {
  14. assertNotNull(new Node<Double>(12.0));
  15. assertNotNull(new Node<Double>(12.2, new Node<Double>(13.0)));
  16. }
  17. @Test
  18. public void testSetNext()
  19. {
  20. Node<Double> node = new Node<>(13.0);
  21. Node<Double> node2 = new Node<>(14.5);
  22. node.setNext(node2);
  23. assertTrue(node.getNext().getData().equals(14.5));
  24. }
  25. }