@Test public void throwsUnparsableExceptionForNonIntegerWeight() throws UnparsableException { FunctionalResults<Double> result = new FunctionalResults<>(5.2, new HashSet<String>()); when(mockPetriNetController.parseFunctionalExpression(anyString())).thenReturn(result); exception.expect(UnparsableException.class); exception.expectMessage("Value is not an integer, please surround expression with floor or ceil"); controller.setWeight(DEFAULT_TOKEN_ID, "1.2"); }
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);  }