@Test public void testDecisionGreaterThan() throws Exception { final JSONObject j = getObjectByLayerId("decisionGreaterThan", "layout"); assertFalse(getExpressionEvaluationAsBoolean(j, "lessThan-numericField")); assertFalse(getExpressionEvaluationAsBoolean(j, "lessThan-stringField")); assertFalse(getExpressionEvaluationAsBoolean(j, "equalTo-numericField")); assertFalse(getExpressionEvaluationAsBoolean(j, "equalTo-stringField")); assertTrue(getExpressionEvaluationAsBoolean(j, "greaterThan-numericField")); assertTrue(getExpressionEvaluationAsBoolean(j, "greaterThan-stringField")); }
private Expression decisionGreaterThan() { if (json.size() != 3) { throwUnexpectedArgumentCount(GREATER_THAN, 2); } Expression firstArgument = parse.string(json, 1); Expression secondArgument = parse.string(json, 2); return ff.function("greaterThan", firstArgument, secondArgument); }
MBDecision extends MBExpression { private Expression decisionGreaterThan() { if (json.size() != 3) { throwUnexpectedArgumentCount(GREATER_THAN, 2); } Expression firstArgument = parse.string(json, 1); Expression secondArgument = parse.string(json, 2); return ff.function("greaterThan", firstArgument, secondArgument); } }
MBDecision extends MBExpression { private Expression decisionGreaterThan() { if (json.size() != 3) { throwUnexpectedArgumentCount(GREATER_THAN, 2); } Expression firstArgument = parse.string(json, 1); Expression secondArgument = parse.string(json, 2); return ff.function("greaterThan", firstArgument, secondArgument); } MBDecision(JSONArray json); }
MBDecision extends MBExpression { private Expression decisionGreaterThan() { if (json.size() != 3) { throwUnexpectedArgumentCount(GREATER_THAN, 2); } Expression firstArgument = parse.string(json, 1); Expression secondArgument = parse.string(json, 2); return ff.function("greaterThan", firstArgument, secondArgument); } MBDecision(JSONArray json); @Override Expression getExpression(); }
MBDecision extends MBExpression { private Expression decisionGreaterThan() { if (json.size() != 3) { throwUnexpectedArgumentCount(GREATER_THAN, 2); } Expression firstArgument = parse.string(json, 1); Expression secondArgument = parse.string(json, 2); return ff.function("greaterThan", firstArgument, secondArgument); } MBDecision(JSONArray json); @Override Expression getExpression();  }