return state.operate(Operation.POWER, leftOperand, rightOperand);
return state.operate(Operation.DIVIDE, leftOperand, rightOperand);
return state.operate(Operation.MULTIPLY, leftOperand, rightOperand);
return state.operate(Operation.MODULUS, leftOperand, rightOperand);
return state.operate(Operation.POWER, leftOperand, rightOperand);
return state.operate(Operation.DIVIDE, leftOperand, rightOperand);
@Test public void testOperators() { ExpressionState state = getState(); try { state.operate(Operation.ADD,1,2); fail("should have failed"); } catch (EvaluationException ee) { SpelEvaluationException sEx = (SpelEvaluationException)ee; assertEquals(SpelMessage.OPERATOR_NOT_SUPPORTED_BETWEEN_TYPES, sEx.getMessageCode()); } try { state.operate(Operation.ADD,null,null); fail("should have failed"); } catch (EvaluationException ee) { SpelEvaluationException sEx = (SpelEvaluationException)ee; assertEquals(SpelMessage.OPERATOR_NOT_SUPPORTED_BETWEEN_TYPES, sEx.getMessageCode()); } }
return state.operate(Operation.MULTIPLY, leftOperand, rightOperand);
return state.operate(Operation.MODULUS, leftOperand, rightOperand);
newValue = state.operate(Operation.ADD, returnValue.getValue(), 1);
newValue = state.operate(Operation.SUBTRACT, returnValue.getValue(), 1);
newValue = state.operate(Operation.ADD, returnValue.getValue(), 1);
newValue = state.operate(Operation.SUBTRACT, returnValue.getValue(), 1);
return state.operate(Operation.POWER, leftOperand, rightOperand);
return state.operate(Operation.DIVIDE, leftOperand, rightOperand);
return state.operate(Operation.MODULUS, leftOperand, rightOperand);