MUnit 2.1.2 - Passing Uri Parameters and Headers in MUnit before calling the flow
How to pass Headers in MUnit test case before calling the flow?
For example, if you want to set the following headers like userId, role, TTL for the flow to do unit testing, then you need to use the attrible section of set message and use the following Mule expression.
The value would have the below value.
#[{headers : {'userId' :'105632756','role' :'Registration,Profile','TTL' :'2592000'}}]
<munit:attributes value="#[{headers : {'userId' :'105632756','role' :'Registration,Profile','TTL' :'2592000'}}]" encoding="UTF-16"/>
How to pass Uri Parameters in MUnit test case before calling flow?
<munit:attributes value="#[{uriParams : {'id' :'18350','account-id' :'12278'}}]" />
Jayaraman Pancharathinam
20 Nov 2018
Thanks for sharing such quality information.
ReplyDeleteMulesoft Online Training
Mulesoft Online Training in Hyderabad