RestFixtureTests.CollapseableContent

Included page: .RestFixtureTests.SetUp (edit)

script smartrics.rest.test.fitnesse.fixture.HttpServerFixture
check is started true
reset resources database

In the interest of readability, cells with large content can be rendered with a toggle on/off button.
The minimum length in characters of the cell, in order to enable the toggle button, is specified with the property

restfixture.display.toggle.for.cells.larger.than

If the value of the property is negative the toggle button will not be rendered.

Currently only large HTTP response content cells (if the actual value is displayed) are enabled for toggling.

Table: Rest Fixture http://localhost:9876
GET
200
Set-Cookie : JID="ABC.${a.y}";
Content-Type : application/xml;charset=ISO-8859-1
Content-Length : 910
Server : Jetty(6.0.2)
/resource/type[text()='large content']
expected

toggle actual

<resource>
   <name>giant bob</name>
   <type>large content</type>
   <address>
       <street>
            Regent Street
       </street>
       <number>
            12345
       </number>
   </address>
   <data>
       <part id='0'>
           <source href='http://en.wikipedia.org/wiki/Inferno_(Dante)' />
           <content>
Inferno (Italian for 'Hell') is the first part of Dante Alighieri's 14th-century epic poem Divine Comedy. 
It is followed by Purgatorio and Paradiso. It is an allegory telling of the journey of Dante through what is 
largely the medieval concept of Hell, guided by the Roman poet Virgil. In the poem, Hell is depicted as nine 
circles of suffering located within the Earth. Allegorically, the Divine Comedy represents the journey of the soultowards God, with the Inferno describing the recognition and rejection of sin.
           </content>
       </part>
   </data>
</resource>

actual


Table: Rest Fixture http://localhost:9876
GET
200
Set-Cookie : JID="ABC.${a.y}";
Content-Type : application/xml;charset=ISO-8859-1
Content-Length : 295
Server : Jetty(6.0.2)
/resource/type[text()='one liner']
expected

toggle actual

<resource>
   <name>long foo</name>
   <type>one liner</type>
   <data>
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000   </data>
</resource>

actual