Exemple #1
0
    def test_random_intersection_selection(self):
        self.rural = RuralArea(self.urban1)
        self.assertIsInstance(self.rural.startPos1, int)
        self.assertIsInstance(self.rural.startPos2, int)
        self.assertNotEqual(self.rural.startPos1, self.rural.startPos2)

        self.rural = RuralArea(self.urban2)
        self.assertIsInstance(self.rural.startPos1, int)
        self.assertIsInstance(self.rural.startPos2, int)
        self.assertNotEqual(self.rural.startPos1, self.rural.startPos2)
Exemple #2
0
    def __init__(self, config):
        # initialize the urban areas
        self.urbanAreas = []
        self.urbanAreas.append(UrbanArea(config, 17, 0))
        self.urbanAreas.append(UrbanArea(config, 2, 51))

        # initialize the rural area with the urban areas
        self.ruralAreas = []
        self.ruralAreas.append(RuralArea(self.urbanAreas[0]))
        self.ruralAreas.append(RuralArea(self.urbanAreas[1]))

        # initialize the dividers
        self.divider = CenterDivider(config)
        self.bottomDivider = BottomDivider(config)
        self.topDivider = TopDivider(config)

        # initialize scanners
        self.perimeterScanner = PerimeterEntranceScanner(config)

        # limo controller
        self.limoController = LimoController(config, self.perimeterScanner)
Exemple #3
0
    def test_width(self):
        self.rural = RuralArea(self.urban1)
        self.assertEqual(self.rural.width, self.urban1.width)

        self.rural = RuralArea(self.urban2)
        self.assertEqual(self.rural.width, self.urban2.width)
Exemple #4
0
    def test_height(self):
        self.rural = RuralArea(self.urban1)
        self.assertEqual(self.rural.height, 16)

        self.rural = RuralArea(self.urban2)
        self.assertEqual(self.rural.height, 16)
Exemple #5
0
    def test_xPos(self):
        self.rural = RuralArea(self.urban1)
        self.assertEqual(self.rural.xPos, 0)

        self.rural = RuralArea(self.urban2)
        self.assertEqual(self.rural.xPos, 51)
Exemple #6
0
    def test_yPos(self):
        self.rural = RuralArea(self.urban1)
        self.assertEqual(self.rural.yPos, 2)

        self.rural = RuralArea(self.urban2)
        self.assertEqual(self.rural.yPos, 9)
Exemple #7
0
    def test_hPosition(self):
        self.rural = RuralArea(self.urban1)
        self.assertEqual(self.rural.hPos, 'left')

        self.rural = RuralArea(self.urban2)
        self.assertEqual(self.rural.hPos, 'right')
Exemple #8
0
    def test_position(self):
        self.rural = RuralArea(self.urban1)
        self.assertEqual(self.rural.pos, 'up')

        self.rural = RuralArea(self.urban2)
        self.assertEqual(self.rural.pos, 'down')