|
|
|
@ -1,6 +1,7 @@
|
|
|
|
|
package com.fanruan.api.cal; |
|
|
|
|
|
|
|
|
|
import com.fanruan.api.Prepare; |
|
|
|
|
import com.fr.base.Parameter; |
|
|
|
|
import com.fr.script.Calculator; |
|
|
|
|
import com.fr.stable.ParameterProvider; |
|
|
|
|
import com.fr.stable.UtilEvalError; |
|
|
|
@ -47,4 +48,17 @@ public class ParameterKitTest extends Prepare {
|
|
|
|
|
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()); |
|
|
|
|
} |
|
|
|
|
} |