Petals-BC-REST 2.5.0+

compared with
Key
This line was removed.
This word was removed. This word was added.
This line was added.

Changes (2)

View Page History
The parameters of this assertion are:
* {{expectedURI}}: The expected URI of the generated HTTP request,
* {{expectedJSONPayloadResourceName}}: Name of the resource containing the expected JSON payload of the HTTP request body,
* {{opUnderTest}}: The service operation under test generating the HTTP request. The configuration of this service operation is given in the service unit JBI descriptor,
* {{mep}}: The message exchange pattern with which the JBI request send to the service operation under test,
{code}

h3. Assertion 'assertJBIRequestXML'

This assertion validates the transformation of the given JBI request into the given HTTP *XML* request.

The parameters of this assertion are:
* {{expectedURI}}: The expected URI of the generated HTTP request,
* {{expectedXMLPayloadResourceName}}: Name of the resource containing the expected XML payload of the HTTP request body,
* {{opUnderTest}}: The service operation under test generating the HTTP request. The configuration of this service operation is given in the service unit JBI descriptor,
* {{mep}}: The message exchange pattern with which the JBI request send to the service operation under test,
* {{inXMLPayloadResourceName}}: Name of the resource containing the XML payload of the JBI request sent to the service operation under test.

Example:
{code}
@ServiceOperationUnderTestExtension(
operation = @ServiceOperationName(
namespace = EDM_NAMESPACE,
name = OP_NAME_RESET_METADATAS_BY_XML))
public static ServiceOperationUnderTest OPERATION_UNDER_TEST;

@Test
public void requestWithMetadata() throws Exception {

assertJBIRequestXML("reset-metadatas-by-xml-with-metadatas-expected-request.xml", OPERATION_UNDER_TEST,
MEPConstants.IN_OUT_PATTERN, "reset-metadatas-by-xml-with-metadatas-request.xml");
}
{code}

h3. Assertion 'assertJBIRequestMultiPart'