-1
Ich lese die JSON aus der TXT-Datei in MUnit Testfall, Einstellung auf Payload. Ich erwarte, dass Nutzlast hat das Feld und seinen Wert in. TXT-Datei in Form definiert Karte. Aber ich bekomme null statt Wert. Schätzen Sie Ihre Hilfe beim Isolieren des Problems.Problem mit Übergabe von Payload zu einem anderen Fluss in Munit
<!-- TESTCASE: -->
<munit:test name="test-update" description="Validate calls to sub flows are being done properly ">
<munit:set payload="#[getResource('testData.txt').asStream()]" doc:name="Set Message">
<munit:inbound-properties>
<munit:inbound-property key="http.method" value="#['POST']" />
<munit:inbound-property key="http.request" value="#['/api/service/v1/update']" />
<munit:inbound-property key="http.request.path" value="#['/api/service/v1/update']" />
</munit:inbound-properties>
</munit:set>
<byte-array-to-object-transformer doc:name="Byte Array to Object" />
<logger level="INFO" message="Payload: #[payload]" doc:name="Logger"/>
<!-- Logs {"Id":"123"} which is read from testData.txt -->
<logger level="INFO" message="Id: #[payload.Id]" doc:name="Logger"/>
<!-- Logs "Id= null" instead of "Id: 123"-->
...
</munit:test>
Ich erhalte" Ausführung des Ausdrucks" payload.get ('Id') Error. FYI: testData.txt enthält folgende Daten: {"Id": "123"} –