All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
FitNesseRoot.files.testResults.RestFixtureTests.OverrideContentHandlers.20160517141612_0_0_0_1.xml Maven / Gradle / Ivy
<?xml version="1.0"?>
<testResults>
<FitNesseVersion>v20151230</FitNesseVersion>
<rootPath>RestFixtureTests.OverrideContentHandlers</rootPath>
<result>
<counts>
<right>2</right>
<wrong>0</wrong>
<ignores>0</ignores>
<exceptions>6</exceptions>
</counts>
<date>2016-05-17T14:16:12+01:00</date>
<runTimeInMillis>16</runTimeInMillis>
<content><div class="collapsible closed"><ul><li><a href='#' class='expandall'>Expand</a></li><li><a href='#' class='collapseall'>Collapse</a></li></ul>
<p class="title">Included page: <a href="RestFixtureTests.SetUp">.RestFixtureTests.SetUp</a> <a href="RestFixtureTests.SetUp?edit&amp;redirectToReferer=true&amp;redirectAction=" class="edit">(edit)</a></p>
<div><table>
<tr class="slimRowTitle">
<td>script</td>
<td colspan="2"><span class="pass">smartrics.rest.test.fitnesse.fixture.HttpServerFixture</span></td>
</tr>
<tr class="slimRowColor0">
<td>check</td>
<td>is started</td>
<td><span class="pass">true</span></td>
</tr>
<tr class="slimRowColor9">
<td colspan="3"><span class="pass">reset resources database</span></td>
</tr>
</table>
</div>
</div>
<br/><a href="RestFixture">.RestFixture</a> uses three content handlers to parse and set expectations used to verify the behaviour of HTTP calls.<br/>These are the handlers currently available:<br/><ul>
<li><b>XML</b> interprets the body as an xml string and allows XPath expressions as expectations on that content</li>
<li><b>JSON</b> interprets the body as a JSON string and allows expectations to be written in JavaScript<a title="create page" href="RestFixtureTests.JavaScript?edit&amp;nonExistent=true">[?]</a>.</li>
<li><b>TEXT</b> interprets the body as a string and allows regular expression expectations.</li>
</ul>
<br/>These are the defaults<br/><br/><ul>
<li>default=XML</li>
<li>application/xml=XML</li>
<li>application/json=JSON</li>
<li>text/plain=TEXT</li>
</ul>
<br/><div class="collapsible"><ul><li><a href='#' class='expandall'>Expand</a></li><li><a href='#' class='collapseall'>Collapse</a></li></ul>
<p class="title">Note: unrecognised content types.</p>
<div>Content types not recogised will be mapped to the default content handler (XML).<br/></div>
</div>
<br/>For example, XML handler is used for for content types of application/xml; hence XPaths can be used to set expectations:<br/><br/><table>
<tr class="slimRowTitle">
<td>Table: Rest Fixture <span class="error">Could not invoke constructor for RestFixture[1]</span></td>
<td colspan="4"><a href="http://localhost:9876">http://localhost:9876</a></td>
</tr>
<tr class="slimRowColor0">
<td>GET</td>
<td>/resources/0</td>
<td>200</td>
<td>Content-Type : application/xml;.+</td>
<td>
/resource/name[text()='a funky name'] <br/>
/resource/data[text()='an important message']
</td>
</tr>
</table>
<br/>Bespoke mapping can be defined in the config using the config key <b>restfixture.content.handlers.map</b><br/><br/><table>
<tr class="slimRowTitle">
<td>Table: Rest Fixture Config <span class="error">Could not invoke constructor for RestFixtureConfig[1]</span></td>
<td>overridesContentHandlerConfig</td>
</tr>
<tr class="slimRowColor0">
<td>restfixture.content.handlers.map</td>
<td>
application/xml=TEXT
</td>
</tr>
</table>
<br/><table>
<tr class="slimRowTitle">
<td>Table: Rest Fixture <span class="error">Could not invoke constructor for RestFixture[2]</span></td>
<td><a href="http://localhost:9876">http://localhost:9876</a></td>
<td colspan="3">overridesContentHandlerConfig</td>
</tr>
<tr class="slimRowColor0">
<td>GET</td>
<td>/resources/0</td>
<td>200</td>
<td>Content-Type : application/xml;.+</td>
<td>&lt;resource&gt;[\s.]*&lt;name&gt;a funky name&lt;/name&gt;[\s\w\d&lt;&gt;/=\:'.]*&lt;/resource&gt;[\s]*</td>
</tr>
</table>
<br/></content>
<relativePageName>OverrideContentHandlers</relativePageName>
<instructions>
<instructionResult>
<instruction>{id='scriptTable_0_0', instruction='make', instanceName='scriptTableActor', className='smartrics.rest.test.fitnesse.fixture.HttpServerFixture', args=[]}</instruction>
<slimResult>pass(smartrics.rest.test.fitnesse.fixture.HttpServerFixture)</slimResult>
<expectation>
<status>pass</status>
<instructionId>scriptTable_0_0</instructionId>
<col>1</col>
<row>0</row>
<type>ConstructionExpectation</type>
<evaluationMessage>smartrics.rest.test.fitnesse.fixture.HttpServerFixture</evaluationMessage>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='scriptTable_0_1', instruction='call', instanceName='scriptTableActor', methodName='isStarted', args=[]}</instruction>
<slimResult>pass(true)</slimResult>
<expectation>
<status>pass</status>
<instructionId>scriptTable_0_1</instructionId>
<col>2</col>
<row>1</row>
<type>ReturnedValueExpectation</type>
<evaluationMessage>true</evaluationMessage>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='scriptTable_0_2', instruction='call', instanceName='scriptTableActor', methodName='resetResourcesDatabase', args=[]}</instruction>
<slimResult>pass()</slimResult>
<expectation>
<status>pass</status>
<instructionId>scriptTable_0_2</instructionId>
<col>0</col>
<row>2</row>
<type>ScriptActionExpectation</type>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='tableTable_1_0', instruction='make', instanceName='tableTable_1', className='RestFixture', args=[<a href="http://localhost:9876">http://localhost:9876</a>]}</instruction>
<slimResult></slimResult>
<expectation>
<status>error</status>
<instructionId>tableTable_1_0</instructionId>
<type>ConstructionExpectation</type>
<evaluationMessage>Could not invoke constructor for RestFixture[1]</evaluationMessage>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='tableTable_1_1', instruction='call', instanceName='tableTable_1', methodName='doTable', args=[[[GET, /resources/0, 200, Content-Type : application/xml;.+,
/resource/name[text()='a funky name'] <br/>
/resource/data[text()='an important message']
]]]}</instruction>
<slimResult></slimResult>
<expectation>
<status>error</status>
<instructionId>tableTable_1_1</instructionId>
<type>TableTableExpectation</type>
<evaluationMessage>The instance tableTable_1.doTable. does not exist</evaluationMessage>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='tableTable_2_0', instruction='make', instanceName='tableTable_2', className='RestFixtureConfig', args=[overridesContentHandlerConfig]}</instruction>
<slimResult></slimResult>
<expectation>
<status>error</status>
<instructionId>tableTable_2_0</instructionId>
<type>ConstructionExpectation</type>
<evaluationMessage>Could not invoke constructor for RestFixtureConfig[1]</evaluationMessage>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='tableTable_2_1', instruction='call', instanceName='tableTable_2', methodName='doTable', args=[[[restfixture.content.handlers.map,
application/xml=TEXT
]]]}</instruction>
<slimResult></slimResult>
<expectation>
<status>error</status>
<instructionId>tableTable_2_1</instructionId>
<type>TableTableExpectation</type>
<evaluationMessage>The instance tableTable_2.doTable. does not exist</evaluationMessage>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='tableTable_3_0', instruction='make', instanceName='tableTable_3', className='RestFixture', args=[<a href="http://localhost:9876">http://localhost:9876</a>, overridesContentHandlerConfig]}</instruction>
<slimResult></slimResult>
<expectation>
<status>error</status>
<instructionId>tableTable_3_0</instructionId>
<type>ConstructionExpectation</type>
<evaluationMessage>Could not invoke constructor for RestFixture[2]</evaluationMessage>
</expectation>
</instructionResult>
<instructionResult>
<instruction>{id='tableTable_3_1', instruction='call', instanceName='tableTable_3', methodName='doTable', args=[[[GET, /resources/0, 200, Content-Type : application/xml;.+, <resource>[\s.]*<name>a funky name</name>[\s\w\d<>/=\:'.]*</resource>[\s]*]]]}</instruction>
<slimResult></slimResult>
<expectation>
<status>error</status>
<instructionId>tableTable_3_1</instructionId>
<type>TableTableExpectation</type>
<evaluationMessage>The instance tableTable_3.doTable. does not exist</evaluationMessage>
</expectation>
</instructionResult>
</instructions>
</result>
<finalCounts>
<right>0</right>
<wrong>0</wrong>
<ignores>0</ignores>
<exceptions>1</exceptions>
</finalCounts>
<totalRunTimeInMillis>16</totalRunTimeInMillis>
</testResults>