优化测试用例代码

This commit is contained in:
everywhere.z 2024-05-17 17:20:49 +08:00
parent 13f5ed83aa
commit 46c974eead
1 changed files with 9 additions and 0 deletions

View File

@ -35,4 +35,13 @@ public class ContextBeanSpringbootTest extends BaseTest {
TestContext context = response.getContextBean("skuContext");
Assertions.assertEquals("J001", context.getSkuCode());
}
// new一个上下文的情况
@Test
public void testContextBean2() throws Exception {
LiteflowResponse response = flowExecutor.execute2Resp("chain1", "arg", new TestContext("J001", "test"));
Assertions.assertTrue(response.isSuccess());
TestContext context = response.getContextBean("skuContext");
Assertions.assertEquals("J001", context.getSkuCode());
}
}