我正在编写Munit for Proc-layer实现流程,它使用Exchange API连接器调用sys-layer POST端点(系统层RAML在Exchange中发布,用于生成其连接器)。当我为API连接器添加'Mock when‘时,它不模拟连接器并尝试调用实际的API端点。
我已经尝试了'Mock When‘,给出了处理器和doc:id和doc: API连接器的名称。
以下是我的API连接器XML代码
<ol-smart-sys-property:create-announcement-by-code doc:name="Create announcement by code" doc:id="88b6e101-5999-4b11-b2ed-aeaee9ae5bd4" code="#[vars.code]" config-ref="Ol_smart_sys_property_Config"/>
以下是Mock when XML代码
<munit-tools:mock-when doc:name="Mock when" doc:id="8421e6fc-564e-44ea-94fe-78edbd1a979d" processor="ol-smart-sys-property:create-announcement-by-code">
<munit-tools:with-attributes >
<munit-tools:with-attribute attributeName="doc:id" whereValue="88b6e101-5999-4b11-b2ed-aeaee9ae5bd4" />
</munit-tools:with-attributes>
<munit-tools:then-return ></munit-tools:then-return>
</munit-tools:mock-when>
发布于 2019-08-09 17:33:36
删除模拟的with-attributes
部分有效吗?我相信当前运行时中存在一个bug,它使得基于Raml的连接器在指定属性时不能被MUnit模拟
https://stackoverflow.com/questions/57434558
复制相似问题