Browse Source

单元测试

master
richie 5 years ago
parent
commit
b327a5b504
  1. 14
      src/test/java/com/fanruan/api/cal/ParameterKitTest.java

14
src/test/java/com/fanruan/api/cal/ParameterKitTest.java

@ -1,6 +1,7 @@
package com.fanruan.api.cal; package com.fanruan.api.cal;
import com.fanruan.api.Prepare; import com.fanruan.api.Prepare;
import com.fr.base.Parameter;
import com.fr.script.Calculator; import com.fr.script.Calculator;
import com.fr.stable.ParameterProvider; import com.fr.stable.ParameterProvider;
import com.fr.stable.UtilEvalError; import com.fr.stable.UtilEvalError;
@ -47,4 +48,17 @@ public class ParameterKitTest extends Prepare {
calculator.removeNameSpace(ns); calculator.removeNameSpace(ns);
} }
} }
@Test
public void newParameter() {
ParameterProvider provider = ParameterKit.newParameter();
Assert.assertTrue(provider instanceof Parameter);
}
@Test
public void newParameter1() {
ParameterProvider provider = ParameterKit.newParameter("p1", "124");
Assert.assertEquals("p1", provider.getName());
Assert.assertEquals("124", provider.getValue());
}
} }
Loading…
Cancel
Save