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