@Test public void testGetArithmeticExpressionStrForComplexDurationOperation() throws Exception { Map<String, ArchetypeElementVO> elementMap = new HashMap<>(); Map<RefStat, Set<String>> stats = new HashMap<>(); ConstantExpression constantExpression = new ConstantExpression("1,d"); ExpressionItem expressionItem = new BinaryExpression(new BinaryExpression(constantExpression, constantExpression, OperatorKind.ADDITION), constantExpression, OperatorKind.ADDITION); String arithmeticExpressionStr = ExpressionUtil.getArithmeticExpressionStr(elementMap, expressionItem, stats); assertThat(arithmeticExpressionStr, equalTo("(((DVUtil.calculateDuration(\"1,d\",\"+\"))+(DVUtil.calculateDuration(\"1,d\",\"+\")))+(DVUtil.calculateDuration(\"1,d\",\"+\")))")); }
public static String getArithmeticExpressionStr( Map<String, ArchetypeElementVO> elementMap, ExpressionItem expressionItem, Map<RefStat, Set<String>> stats) { return getArithmeticExpressionStr(elementMap, expressionItem, stats, null); }
ExpressionUtil { public static String getArithmeticExpressionStr( Map<String, ArchetypeElementVO> elementMap, ExpressionItem expressionItem, Map<RefStat, Set<String>> stats) { return getArithmeticExpressionStr(elementMap, expressionItem, stats, null); } }
ExpressionUtil { public static String getArithmeticExpressionStr( Map<String, ArchetypeElementVO> elementMap, ExpressionItem expressionItem, Map<RefStat, Set<String>> stats) { return getArithmeticExpressionStr(elementMap, expressionItem, stats, null); }  }
ExpressionUtil { public static String getArithmeticExpressionStr( Map<String, ArchetypeElementVO> elementMap, ExpressionItem expressionItem, Map<RefStat, Set<String>> stats) { return getArithmeticExpressionStr(elementMap, expressionItem, stats, null); }  static String getArithmeticExpressionStr(
            Map<String, ArchetypeElementVO> elementMap,
            ExpressionItem expressionItem, Map<RefStat, Set<String>> stats); static String getVariableWithAttributeStr(String rmName, Variable var); static String getDataValueMethod(String gtCode); static boolean isFunction(String attribute); }
ExpressionUtil { public static String getArithmeticExpressionStr( Map<String, ArchetypeElementVO> elementMap, ExpressionItem expressionItem, Map<RefStat, Set<String>> stats) { return getArithmeticExpressionStr(elementMap, expressionItem, stats, null); }  static String getArithmeticExpressionStr(
            Map<String, ArchetypeElementVO> elementMap,
            ExpressionItem expressionItem, Map<RefStat, Set<String>> stats); static String getVariableWithAttributeStr(String rmName, Variable var); static String getDataValueMethod(String gtCode); static boolean isFunction(String attribute); static final String CODE_FUNCTION_SEPARATOR; }