From b327a5b50417c3a93216280a32551a6569b588b4 Mon Sep 17 00:00:00 2001 From: richie Date: Wed, 28 Aug 2019 17:39:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8D=95=E5=85=83=E6=B5=8B=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/fanruan/api/cal/ParameterKitTest.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/test/java/com/fanruan/api/cal/ParameterKitTest.java b/src/test/java/com/fanruan/api/cal/ParameterKitTest.java index 20bb157..568949f 100644 --- a/src/test/java/com/fanruan/api/cal/ParameterKitTest.java +++ b/src/test/java/com/fanruan/api/cal/ParameterKitTest.java @@ -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()); + } } \ No newline at end of file