unit testing - Mocking Mule Variables Using JUnit -
for following mule flow, how mock random_var variable using junit?
<flow name="flow1" doc:name="flow1"> <choice doc:name="choice"> <when expression="${random_var} == 'true'"> <logger message="random var true" level="debug" doc:name="logger"/> </when> <otherwise> <logger message="random var false" level="debug" doc:name="logger"/> </otherwise> </choice> </flow>
i think first of need vm-endpoint in order able call test within functional test.
further should have at: http://www.mulesoft.org/documentation/display/current/functional+testing
for programmatically invoking vm-endpoints using unit test. describes how pass payload it.
the func-test use separated set of config file can define separated configuration flow, seems thing looking for. define variable? in application-config.xml? func test allow running flow test config (you can use same config test , running flow in mule app server)
sebastian
Comments
Post a Comment