0

我有一个java Munit测试,我正在验证<file:outbound-endpoint>这样的调用:

verifyCallOfMessageProcessor("outbound-endpoint")
    .ofNamespace("file")
    .withAttributes(attribute("path").withValue("/data/local/"),
                    attribute("outputPattern").withValue("vendor_customer_*"))
    .times(1)
    ;

这个片段应该测试下面的Mule代码:

<file:outbound-endpoint path="${root.drive}"
                outputPattern="vendor_customer_#[server.dateTime.format('YYYY_MM_dd_hh_mm_ss.sss')].csv" />

怎么用regular expressioninattribute("outputPattern").withValue("vendor_customer_*"))来表示那个属性值startsWith vendor_customer_

我正在MUnit 3.5使用Mule 3.4.2

4

1 回答 1

0

属性值不支持 RegEx。您需要准确地输入价值。请看一下: https ://docs.mulesoft.com/mule-user-guide/v/3.7/the-mock-message-processor#matchers

作为旁注,请注意 MUnit 不支持测试 Mule 3.4。

高温高压

于 2015-10-07T15:31:44.033 回答