Can someone provide an example of how to use FitNesse String Fixture?
The following doesn't work:
|fitnesse.fixtures.StringFixture|
|value|expected|contains? |
|hello|lo |true |
To provide context I'm trying to verify the value of the Id
field of a output of a REST call:
|Table:smartrics.rest.fitnesse.fixture.RestFixture | http://localhost|
|GET|/data/1234| | | |
|let|body |js| JSON.parse(response.body) | |
|let|id |js| JSON.parse(response.body).Data[0].Id | |
And I'd like not to write any code for this at all if possible.
Looks like contains() returns expected, not true/false. So the test would be:
Not sure this is a useful fixture, looks like it's just a demonstration sample.