ソースを参照

增加测试用例

everywhere.z 1 年間 前
コミット
3d65d77730

+ 6 - 0
liteflow-testcase-el/liteflow-testcase-el-script-python-springboot/src/test/java/com/yomahub/liteflow/test/script/python/common/ScriptPythonCommonELTest.java

@@ -43,4 +43,10 @@ public class ScriptPythonCommonELTest extends BaseTest {
 		Assertions.assertEquals("hi,jack", context.getData("td"));
 	}
 
+	@Test
+	public void testCommon2() {
+		LiteflowResponse response = flowExecutor.execute2Resp("chain2", "arg");
+		Assertions.assertTrue(response.isSuccess());
+	}
+
 }

+ 10 - 0
liteflow-testcase-el/liteflow-testcase-el-script-python-springboot/src/test/resources/common/flow.xml

@@ -25,9 +25,19 @@
         </node>
 
         <node id="s2" name="文件脚本" type="script" file="common/s2.py" language="python"/>
+
+        <node id="s3" name="普通脚本1" type="switch_script" language="python">
+            <![CDATA[
+                "a"
+            ]]>
+        </node>
     </nodes>
 
     <chain name="chain1">
         THEN(a, b, c, s1, s2);
     </chain>
+
+    <chain name="chain2">
+        SWITCH(s3).TO(a,b);
+    </chain>
 </flow>