def test_whenHandlingSaidStateThenPathfinderIsCalled(self): testedState = SequencerState.SendingBotToTreasureState() testedState.handle(self.sequencer,self.map, self.pathfinder) assert self.pathfinder.findPath.called assert self.sequencer.setState.called
def test_whenHandlingSaidStateThenReturnsCorrectOrientationToGiveRobot(self): testedState = SequencerState.SendingBotToTreasureState() path, signal, orientation = testedState.handle(self.sequencer,self.map, self.pathfinder) self.assertEqual(270, orientation)
def test_whenHandlingSaidStateThenReturnsCorrectNextSignalInSequence(self): testedState = SequencerState.SendingBotToTreasureState() path, signal, orientation = testedState.handle(self.sequencer,self.map, self.pathfinder) self.assertEqual("rotateToTreasure", signal)