def testNodeInitializedWithNoParametersHasCorrectValues(self): unit = Node() self.assertEqual(unit.getName(), 0) self.assertEqual(unit.getSize(), 0) self.assertEqual(unit.getX(), 0) self.assertEqual(unit.getY(), 0) self.assertEqual(unit.getEdges(), [])
def testNodeInitializedWithCertainParametersHasCorrectValues(self): n = Node(5, 8, 132, 89, [3, 8, 9]) self.assertEqual(n.getName(), 5) self.assertEqual(n.getSize(), 8) self.assertEqual(n.getX(), 132) self.assertEqual(n.getY(), 89) self.assertSequenceEqual(n.getEdges(), [3, 8, 9])
def testNodeGetEdgesReturnsCorrectEdgeList(self): unit = Node(5, 25, 125, 255, [9, 4, 2]) self.assertSequenceEqual(unit.getEdges(), [9, 4, 2])