def test_whenConstructTargetWithShapeJsonThenReturnShapeTarget(self): testedFactory = TargetFactory() target = testedFactory.constructTarget({"forme":"rectangle"}) self.assertTrue(isinstance(target, ShapeTarget))
def test_whenConstructTargetWithColorJsonThenReturnColorTarget(self): testedFactory = TargetFactory() target = testedFactory.constructTarget({"couleur":"jaune"}) self.assertTrue(isinstance(target, ColorTarget))