All Downloads are FREE. Search and download functionalities are using the official Maven repository.

FitNesseRoot.RestFixtureTests.IssueFixes.Issue120.content.txt Maven / Gradle / Ivy

!3 [[Issue #120][https://github.com/smartrics/RestFixture/issues/120]] Render full URL for REST requests

When you execute a .RestFixture table only the path from the URL is currently rendered from column 2
Ideally we would like to see a full URL here

The behaviour of the formatter controlling how the cells in position 1 is determined by the
config property {{{restfixture.display.absolute.url.in.full}}} which by default is set to true.

In the following table (see source) the path to /resources/0 is {{{%proto%://${jettyHost}:${jettyPort}/resources/0}}}
and by default is should be rendered in full (the label 'proto' is assigned via let.)

| Table: Rest Fixture |http://${jettyHost}:${jettyPort}|
| let | proto | const | http | |
|HEAD | %proto%://${jettyHost}:${jettyPort}/resources/0 | | | |

The config property is now set explicitly set to 'false'.

| Table: Rest Fixture Config  | withRestFixtureAbsoluteUrlInFullSetToFalse |
| restfixture.display.absolute.url.in.full | false |

With the property set, each absolute URL is rendered correctly only showing the file part of the URL.

| Table: Rest Fixture |http://${jettyHost}:${jettyPort}| withRestFixtureAbsoluteUrlInFullSetToFalse |
| comment | the following URI should be NOT shown in full |
|HEAD | %proto%://${jettyHost}:${jettyPort}/resources/0 | | | |
| comment | the following URI should be NOT in full and it is correctly shown in relative |
|HEAD | /resources/0 | | | |

The property can also be set in the default config (see SuiteSetUp), as such, taking effect in each fixture.





© 2015 - 2024 Weber Informatics LLC | Privacy Policy