@Test public void throwsUnparsableExceptionForErrorInWeight() throws UnparsableException { List<String> errors = new LinkedList<>(); errors.add("test error"); FunctionalResults<Double> result = new FunctionalResults<>(5.0, errors, new HashSet<String>()); when(mockPetriNetController.parseFunctionalExpression(anyString())).thenReturn(result); exception.expect(UnparsableException.class); exception.expectMessage("test error"); controller.setWeight(DEFAULT_TOKEN_ID, "5.0"); }
public void setWeight(String token, String expr) throws UnparsableException { throwExceptionIfWeightNotValid(expr); registerUndoableEdit(updateWeightForArc(token, expr)); }
ArcController extends AbstractPetriNetComponentController<Arc<S, T>> { public void setWeight(String token, String expr) throws UnparsableException { throwExceptionIfWeightNotValid(expr); registerUndoableEdit(updateWeightForArc(token, expr)); } }
ArcController extends AbstractPetriNetComponentController<Arc<S, T>> { public void setWeight(String token, String expr) throws UnparsableException { throwExceptionIfWeightNotValid(expr); registerUndoableEdit(updateWeightForArc(token, expr)); } ArcController(Arc<S, T> arc, PetriNetController petriNetController, UndoableEditListener listener); }
ArcController extends AbstractPetriNetComponentController<Arc<S, T>> { public void setWeight(String token, String expr) throws UnparsableException { throwExceptionIfWeightNotValid(expr); registerUndoableEdit(updateWeightForArc(token, expr)); } ArcController(Arc<S, T> arc, PetriNetController petriNetController, UndoableEditListener listener); void setWeight(String token, String expr); void setWeights(Map<String, String> newWeights); String getWeightForToken(String token); Connectable getTarget(); void toggleArcPointType(ArcPoint arcPoint); void splitArcPoint(ArcPoint arcPoint); void addPoint(Point2D point); void deletePoint(ArcPoint point); }
ArcController extends AbstractPetriNetComponentController<Arc<S, T>> { public void setWeight(String token, String expr) throws UnparsableException { throwExceptionIfWeightNotValid(expr); registerUndoableEdit(updateWeightForArc(token, expr)); } ArcController(Arc<S, T> arc, PetriNetController petriNetController, UndoableEditListener listener); void setWeight(String token, String expr); void setWeights(Map<String, String> newWeights); String getWeightForToken(String token); Connectable getTarget(); void toggleArcPointType(ArcPoint arcPoint); void splitArcPoint(ArcPoint arcPoint); void addPoint(Point2D point); void deletePoint(ArcPoint point);  }