コード例 #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
コード例 #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)
コード例 #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)
コード例 #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)
コード例 #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))
コード例 #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)