Browse Source

修改

master
Palin 5 years ago
parent
commit
6cb16987e5
  1. 1
      src/main/java/com/fanruan/api/function/FunctionKit.java
  2. 7
      src/test/java/com/fanruan/api/util/RenderKitTest.java

1
src/main/java/com/fanruan/api/function/FunctionKit.java

@ -77,7 +77,6 @@ public class FunctionKit {
return new NameAndDescription[0]; return new NameAndDescription[0];
} }
/** /**
* 得到函数管理器实例 * 得到函数管理器实例
* @return 函数管理器 * @return 函数管理器

7
src/test/java/com/fanruan/api/util/RenderKitTest.java

@ -28,8 +28,11 @@ public class RenderKitTest extends Prepare {
@Test @Test
public void render() throws Exception{ public void render() throws Exception{
Calculator c = Calculator.createCalculator(); Calculator c = Calculator.createCalculator();
Map<String, Object> map = new HashMap<>();
map.put("p1",1);
map.put("p2",2);
String s = "abc${p1}xyz${p2}"; String s = "abc${p1}xyz${p2}";
Assert.assertEquals("abc1xyz2", RenderKit.render(s,c)); Assert.assertEquals("abcxyz", RenderKit.render(s,c));
} }
} }

Loading…
Cancel
Save