@Test public void fromObjectToExpressionTest() { assertEquals("\"Test\"", expressionEvaluator.fromObjectToExpression("Test")); assertEquals("false", expressionEvaluator.fromObjectToExpression(false)); assertEquals("1", expressionEvaluator.fromObjectToExpression(BigDecimal.valueOf(1))); assertEquals("date( \"2019-05-13\" )", expressionEvaluator.fromObjectToExpression(LocalDate.of(2019, 5, 13))); assertEquals("null", expressionEvaluator.fromObjectToExpression(null)); }
@Override public String fromObjectToExpression(Object value) { FEELFnResult<String> invoke = codeFunction.invoke(value); return invoke.getOrElseThrow(feelEvent -> new IllegalArgumentException("This should not happen", feelEvent.getSourceException())); }
DMNFeelExpressionEvaluator extends AbstractExpressionEvaluator { @Override public String fromObjectToExpression(Object value) { FEELFnResult<String> invoke = codeFunction.invoke(value); return invoke.getOrElseThrow(feelEvent -> new IllegalArgumentException("This should not happen", feelEvent.getSourceException())); } }
DMNFeelExpressionEvaluator extends AbstractExpressionEvaluator { @Override public String fromObjectToExpression(Object value) { FEELFnResult<String> invoke = codeFunction.invoke(value); return invoke.getOrElseThrow(feelEvent -> new IllegalArgumentException("This should not happen", feelEvent.getSourceException())); } DMNFeelExpressionEvaluator(ClassLoader classLoader); }
DMNFeelExpressionEvaluator extends AbstractExpressionEvaluator { @Override public String fromObjectToExpression(Object value) { FEELFnResult<String> invoke = codeFunction.invoke(value); return invoke.getOrElseThrow(feelEvent -> new IllegalArgumentException("This should not happen", feelEvent.getSourceException())); } DMNFeelExpressionEvaluator(ClassLoader classLoader); @Override String fromObjectToExpression(Object value); }
DMNFeelExpressionEvaluator extends AbstractExpressionEvaluator { @Override public String fromObjectToExpression(Object value) { FEELFnResult<String> invoke = codeFunction.invoke(value); return invoke.getOrElseThrow(feelEvent -> new IllegalArgumentException("This should not happen", feelEvent.getSourceException())); } DMNFeelExpressionEvaluator(ClassLoader classLoader); @Override String fromObjectToExpression(Object value);  }