@Test public void testDecisionEqualTo() throws Exception { final JSONObject j = getObjectByLayerId("decisionEqualTo", "layout"); assertTrue(getExpressionEvaluationAsBoolean(j, "compareStrings-equal")); assertFalse(getExpressionEvaluationAsBoolean(j, "compareStrings-notEqual")); assertTrue(getExpressionEvaluationAsBoolean(j, "compareNumbers-equal")); assertFalse(getExpressionEvaluationAsBoolean(j, "compareNumbers-notEqual")); assertTrue(getExpressionEvaluationAsBoolean(j, "compareBooleans-equal")); assertFalse(getExpressionEvaluationAsBoolean(j, "compareBooleans-notEqual")); assertFalse(getExpressionEvaluationAsBoolean(j, "compareBooleans-chainedNotEqual")); assertFalse(getExpressionEvaluationAsBoolean(j, "compareTypes-notEqual")); assertTrue(getExpressionEvaluationAsBoolean(j, "compareNull-equal")); assertFalse(getExpressionEvaluationAsBoolean(j, "compareNull-notEqual")); }
private Expression decisionEqualTo() { if (json.size() != 3) { throwUnexpectedArgumentCount(EQUALS, 2); } Expression comparable1 = parse.string(json, 1); Expression comparable2 = parse.string(json, 2); return ff.function("mbEqualTo", comparable1, comparable2); }
MBDecision extends MBExpression { private Expression decisionEqualTo() { if (json.size() != 3) { throwUnexpectedArgumentCount(EQUALS, 2); } Expression comparable1 = parse.string(json, 1); Expression comparable2 = parse.string(json, 2); return ff.function("mbEqualTo", comparable1, comparable2); } }
MBDecision extends MBExpression { private Expression decisionEqualTo() { if (json.size() != 3) { throwUnexpectedArgumentCount(EQUALS, 2); } Expression comparable1 = parse.string(json, 1); Expression comparable2 = parse.string(json, 2); return ff.function("mbEqualTo", comparable1, comparable2); } MBDecision(JSONArray json); }
MBDecision extends MBExpression { private Expression decisionEqualTo() { if (json.size() != 3) { throwUnexpectedArgumentCount(EQUALS, 2); } Expression comparable1 = parse.string(json, 1); Expression comparable2 = parse.string(json, 2); return ff.function("mbEqualTo", comparable1, comparable2); } MBDecision(JSONArray json); @Override Expression getExpression(); }
MBDecision extends MBExpression { private Expression decisionEqualTo() { if (json.size() != 3) { throwUnexpectedArgumentCount(EQUALS, 2); } Expression comparable1 = parse.string(json, 1); Expression comparable2 = parse.string(json, 2); return ff.function("mbEqualTo", comparable1, comparable2); } MBDecision(JSONArray json); @Override Expression getExpression();  }