def test_givenWrongDict_whenFromDict_thenThrowsKeyError(self): with self.assertRaises(KeyError): Pose.from_dict(A_WRONG_DICT)
def test_givenWrongDict_whenFromDict_thenThrowsKeyError(self): with self.assertRaises(KeyError): Pose.from_dict(A_WRONG_DICT)
def test_givenDict_whenFromDict_thenReturnNewPose(self): pose = Pose.from_dict(A_DICT) self.assertEqual(pose.x, A_DICT['x']) self.assertEqual(pose.y, A_DICT['y']) self.assertEqual(pose.orientation, A_DICT['orientation'])
def test_givenDict_whenFromDict_thenReturnNewPose(self): pose = Pose.from_dict(A_DICT) self.assertEqual(pose.x, A_DICT['x']) self.assertEqual(pose.y, A_DICT['y']) self.assertEqual(pose.orientation, A_DICT['orientation'])