Exemplo n.º 1
0
 def test_get_next_None(self):
     """
     Input: None
     The fn get_next should raise ValueError exception.
     :return: void
     """
     try:
         get_next(None)
         self.fail()
     except ValueError:
         pass
Exemplo n.º 2
0
 def test_get_next_from_n6(self):
     """
     Input: Node with value 6.
     The fn get_next should return the node with value 7.
     :return: void
     """
     self.assertTrue(get_next(self.n6) is self.n7)
Exemplo n.º 3
0
 def test_get_next_from_n4(self):
     """
     Input: Node with value 4.
     The fn get_next should return the node with value 5.
     :return: void
     """
     self.assertTrue(get_next(self.n4) is self.n5)
Exemplo n.º 4
0
 def test_get_next_from_n1(self):
     """
     Input: Node with value 1.
     The fn get_next should return the node with value 2.
     :return: void
     """
     self.assertTrue(get_next(self.n1) is self.n2)
Exemplo n.º 5
0
 def test_get_next_from_n10(self):
     """
     Input: Node with value 10.
     The fn get_next should return None.
     :return: void
     """
     self.assertIsNone(get_next(self.n10))
Exemplo n.º 6
0
 def test_get_next_from_n8(self):
     """
     Input: Node with value 8.
     The fn get_next should return the node with value 9.
     :return: void
     """
     self.assertTrue(get_next(self.n8) is self.n9)