def testFrontierRemovePointEmptyPointListShouldBeEmpty(self):
     frontier = Frontier()
     self.assertEqual([], frontier._points)
     self.assertEqual(0, len(frontier._points))
     frontier.remove_point()
     self.assertEqual([], frontier._points)
     self.assertEqual(0, len(frontier._points))
 def testFrontierAddPointToEmptyPointsListShouldBeLengthOne(self):
     frontier = Frontier()
     self.assertEqual([], frontier._points)
     self.assertEqual(0, len(frontier._points))
     frontier.add_point(Point(3, 4))
     self.assertEqual([Point(3, 4)], frontier._points)
     self.assertEqual(1, len(frontier._points))
 def testFrontierRemovePointListLengthOneShouldBeLengthOne(self):
     frontier = Frontier()
     frontier.add_point(Point(3, 4))
     self.assertEqual([Point(3, 4)], frontier._points)
     self.assertEqual(1, len(frontier._points))
     frontier.remove_point()
     self.assertEqual([Point(3, 4)], frontier._points)
     self.assertEqual(1, len(frontier._points))
 def testFrontierAddPointToPointListWithOneShouldBeLengthTwo(self):
     frontier = Frontier()
     frontier.add_point(Point(3, 4))
     self.assertEqual([Point(3, 4)], frontier._points)
     self.assertEqual(1, len(frontier._points))
     frontier.add_point(Point(5, 6))
     self.assertEqual([Point(3, 4), Point(5, 6)], frontier._points)
     self.assertEqual(2, len(frontier._points))
 def testFrontierSetGoalHadGoalHasNewGoal(self):
     frontier = Frontier()
     frontier.set_goal(Point(1, 2))
     self.assertEqual(Point(1, 2), frontier._goal)
     frontier.set_goal(Point(3, 4))
     self.assertEqual(Point(3, 4), frontier._goal)
 def testFrontierSetGoalHadNoGoalGivenGoal(self):
     frontier = Frontier()
     frontier.set_goal(Point(1, 2))
     self.assertEqual(Point(1, 2), frontier._goal)
 def testFrontierInitShouldBeEmptyPointsList(self):
     frontier = Frontier()
     self.assertEqual([], frontier._points)
     self.assertEqual(0, len(frontier._points))