def test_whenGettingCurrentWorldInformationThenEverythingIsCalledAccordingly(self):
        testedDispatcher = BaseStationDispatcher(self.worldVision)
        info = testedDispatcher.getCurrentWorldInformation()

        self.assertIsNotNone(info['robotPosition'])
        self.assertIsNotNone(info['robotOrientation'])
        self.assertIsNotNone(info['encodedImage'])
    def test_whenHandlingCurrentSequencerStateThenEverythingIsCalledAccordingly(self):
        testedDispatcher = BaseStationDispatcher(self.worldVision)
        testedDispatcher.sequencer = self.sequencer
        testedDispatcher.handleCurrentSequencerState()

        assert self.worldVision.getCurrentImage.called
        assert self.sequencer.handleCurrentState.called
    def test_whenInitialisingWorldDataThenEverythingIsCalledAccordingly(self):
        testedDispatcher = BaseStationDispatcher(self.worldVision)
        testedDispatcher.initialiseWorldData()

        assert self.worldVision.initializeRound.called
        assert self.worldVision.getCurrentImage.called
        self.assertIsNotNone(testedDispatcher.sequencer)
        self.assertIsNotNone(testedDispatcher.pathfinder)
    def test_whenSettingTreasuresThenWorldVisionCallsSetTreasures(self):
        testedDispatcher = BaseStationDispatcher(self.worldVision)
        testedDispatcher.setTreasuresOnMap([48.0])

        assert self.worldVision.setTreasures.called
    def test_whenSettingTargetOnMapThenWorldVisionCallsSetTarget(self):
        testedDispatcher = BaseStationDispatcher(self.worldVision)
        testedDispatcher.setTargetOnMap({"forme":"rectangle"})

        assert self.worldVision.setTarget.called
    def test_whenStartingFromTargetThenSequencerStateIsChanged(self):
        testedDispatcher = BaseStationDispatcher(self.worldVision)
        testedDispatcher.sequencer = self.sequencer
        testedDispatcher.startFromTarget()

        assert self.sequencer.setState.called