Reputation: 1764
I have a decision table that accepts Xml as one of the input parameters, and returns Xml as one of the output parameters. For example:
!|FixtureThatUsesXml|
|request|fieldX|response?|
|<Xml><SomeContent a="1"/></Xml>|2| |
Is it possible to have the Xml in the request and response formatted (with syntax colouring and appropriate line breaks)? For the response, perhaps I could return text that is encoded to include the rich text formatting? What's possible?
Upvotes: 1
Views: 207
Reputation: 3272
You can have your (Slim) fixture output HTML. That will be used when displaying the response.
Having the request formatted is not that easy if you want to go beyond pre-formatted text, because you have to use the wiki formatting features and will have to remmove it in the fixture.
You can easily have pre-formatted XML in your wiki (by enclosing in {{{
and }}}
) which your fixture then would remove before actually using the XML. But highlighting etc in your requests is not easy to do.
The XML fixtures I use do accept pre-formatted input and show responses formatted. But it is not as fancy as you describe (see this sample test output).
Upvotes: 1