I have a flow that I am trying to test a basic HTTP flow in Mule using Munit, the flow looks something like this:
<flow name="health-checkFlow">
<http:listener config-ref="HTTP_Listener_Configuration"
path="/" allowedMethods="GET" doc:name="HTTP">
<http:response-builder />
</http:listener>
....
</flow>
With Munit I am calling the flow using:
MuleEvent resultEvent = runFlow("health-checkFlow", testEvent(""));
The resultEvent object has the proper payload, but when I try to get the http response code using:
assertEquals("HTTP status code should be 200","200",resultEvent.getMessage().getOutboundProperty("http.status"));
the status is always null. How do I get the http response code from the message in Munit?
Aucun commentaire:
Enregistrer un commentaire