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