christophd opened a new pull request, #27792:
URL: https://github.com/apache/camel/pull/27792

   ## Summary
   
   Introduces a new `camel-test-citrus` component that integrates with the 
[Citrus integration test framework](https://citrusframework.org/) for message 
validation in Camel route tests.
   
   - **Validate operation** (`citrus:validate`): template-based message 
validation using Citrus validation modules (JSON, XML, YAML, plain text, 
binary, Hamcrest) with a fluent API for single-spec (`allMessages()`) and 
per-exchange sequential (`message(index)`) validation, including ignore 
expressions, validation matchers, and test variable resolution via exchange 
properties
   - **Receive operation** (`citrus:receive`): request/response simulation with 
a Gherkin-style fluent API — `when().message(n).receive()` for expected request 
validation, `then().message(n).respond()` for simulated response definition, 
with support for Citrus test variables and functions in response templates
   - **MessagePayloadBuilder support**: `body(MessagePayloadBuilder)` overload 
on both validation and response specs, enabling Citrus payload builders (file 
resources, Groovy script builders, marshalling builders, custom 
implementations) and lambda expressions
   
   ### Test coverage (34 tests across 7 test classes)
   
   - `CitrusValidateJsonTest` — JSON body, headers, JsonPath, auto-detection, 
exchange property variables, payload builder
   - `CitrusValidateXmlTest` — XML body, XPath, namespace-aware validation
   - `CitrusValidatePlainTextTest` — plain text with ignore expressions
   - `CitrusValidateYamlTest` — YAML body and ignore expressions
   - `CitrusSequentialValidationTest` — per-exchange sequential specs, 
allMessages fallback, auto-increment
   - `CitrusMultipleEndpointsTest` — multiple named endpoints in a single route
   - `CitrusReceiveTest` — validate+respond, response headers, Citrus 
variables, sequential receive/respond, send() alias, response-only mode, 
validation mismatch, payload builder
   
   ## Test plan
   
   - [x] All 34 unit tests pass (`mvn verify` in 
`components/camel-test/camel-test-citrus`)
   - [x] Module builds successfully with Java 21
   - [x] Code formatted (`mvn formatter:format impsort:sort`)
   - [x] Generated files committed (catalog, endpoint DSL, configurers)
   - [ ] Full reactor build (`mvn clean install -DskipTests` from root)
   - [ ] CI checks pass
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to