如何测试仅设置属性的骆驼路线
我有一个路由构建器,它取决于消息设置特定属性的内容。它不会将其发送到其他端点,因此我无法嘲笑它们并检查它们得到的内容。 我可以产生一条消息或交换,但是在该路线建设者将其转换后,是否有办法检查它?
I have a route builder that depending on the content of a message sets specific properties. It doesn't send it to other endpoints so I cannot mock them and check what they got.
I can produce a message or exchange but is there a way to check it after it was transformed by this route builder?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
假设您的路线是同步的(即不是
来自:SEDA
),则可以简单地检查通过product> productereTemplate
发送的属性已更新该属性。假设您需要检查属性
testProp
的值:Assuming that your route is synchronous (i.e. not
from:seda
), you can simply check that the property was updated on the exchange that you send via theProducerTemplate
.Let's assume that you need to check the value of the property
TestProp
: