@@ -18,7 +18,7 @@ public class FunctionCallTest {
1818 public void testInvoke () {
1919 SingleReturnMethod toolTestClass = new SingleReturnMethod ();
2020 FCP fcp = FCP .create ();
21- fcp .functionCall (toolTestClass );
21+ fcp .parse (toolTestClass );
2222
2323 String invokeStr1 = "{\" a\" :25,\" b\" :230}" ;
2424 Assertions .assertEquals (5 , fcp .functionCall ("gcd" , invokeStr1 ));
@@ -30,7 +30,7 @@ public void testInvoke() {
3030 public void testInvokeException () {
3131 SingleReturnMethod toolTestClass = new SingleReturnMethod ();
3232 FCP fcp = FCP .create ();
33- fcp .functionCall (toolTestClass );
33+ fcp .parse (toolTestClass );
3434 String invokeStr = "{\" b\" :25,\" b\" :230}" ;
3535 Assertions .assertThrows (NullPointerException .class , () -> fcp .functionCall ("gcd" , invokeStr ), "没有找到对应的方法:gcd.a" );
3636 }
@@ -39,7 +39,7 @@ public void testInvokeException() {
3939 public void testVoidReturn () {
4040 SingleNoReturnMethod singleNoReturnMethod = new SingleNoReturnMethod ();
4141 FCP fcp = FCP .create ();
42- fcp .functionCall (singleNoReturnMethod );
42+ fcp .parse (singleNoReturnMethod );
4343
4444 String invokeStr = "{\" message\" :\" hello world\" }" ;
4545 Assertions .assertNull (fcp .functionCall ("printArg" , invokeStr ));
@@ -49,7 +49,7 @@ public void testVoidReturn() {
4949 public void testNoArg () {
5050 SingleNoArgMethod singleNoArgMethod = new SingleNoArgMethod ();
5151 FCP fcp = FCP .create ();
52- fcp .functionCall (singleNoArgMethod );
52+ fcp .parse (singleNoArgMethod );
5353
5454 String invokeStr = "{}" ;
5555 Assertions .assertEquals (123 , fcp .functionCall ("noArg" , invokeStr ));
@@ -59,7 +59,7 @@ public void testNoArg() {
5959 public void testCustomObject () {
6060 SingleReturnMethod singleReturnMethod = new SingleReturnMethod ();
6161 FCP fcp = FCP .create ();
62- fcp .functionCall (singleReturnMethod );
62+ fcp .parse (singleReturnMethod );
6363
6464 String invokeStr = "{\" user\" :{\" name\" :\" azirzsk\" ,\" age\" :25}}" ;
6565 Assertions .assertEquals ("姓名:azirzsk,年龄:25" , fcp .functionCall ("print" , invokeStr ));
@@ -69,7 +69,7 @@ public void testCustomObject() {
6969 public void testNestCustomObject () {
7070 SingleReturnMethod singleReturnMethod = new SingleReturnMethod ();
7171 FCP fcp = FCP .create ();
72- fcp .functionCall (singleReturnMethod );
72+ fcp .parse (singleReturnMethod );
7373
7474 String invokeStr = "{\" home\" :{\" address\" :\" 北京市朝阳区\" ,\" userInfo\" :{\" name\" :\" azirzsk\" ,\" age\" :25}}}" ;
7575 Assertions .assertEquals ("地址:北京市朝阳区,用户信息:姓名:azirzsk,年龄:25" , fcp .functionCall ("printHome" , invokeStr ));
@@ -79,7 +79,7 @@ public void testNestCustomObject() {
7979 public void testRepeatMethod () {
8080 RepeatMethod repeatMethod = new RepeatMethod ();
8181 FCP fcp = FCP .create ();
82- fcp .functionCall (repeatMethod );
82+ fcp .parse (repeatMethod );
8383
8484 String invokeStr = "{\" str\" :\" hello world\" ,\" repeat\" :3}" ;
8585 Assertions .assertEquals ("hello worldhello worldhello world" , fcp .functionCall ("print(String, int)" , invokeStr ));
0 commit comments