GridFixture checks that a grid of values in the table matches the values in a 2D array.
fit.specify.GridFixtureUnderTest |
The method string() in class GridFixtureUnderTest is as follows:
...
public Fixture strings() {
return new GridFixture(new String[][] {
{"a", "b"}, {"c", "d"} });
}
The grid can contain graphics:
The image file names in the table are compared against the File names supplied by the fixture.
The method images() in class GridFixtureUnderTest is as follows:
...
public Fixture images() {
return new GridFixture(new ImageNameGraphic[][] {
{ new ImageNameGraphic("images/wall.jpg"),
new ImageNameGraphic("images/space.jpg"),
new ImageNameGraphic("images/box.jpg"),
new ImageNameGraphic("images/space.jpg"),
new ImageNameGraphic("images/wall.jpg") }});
}