Blame view

test/FitNesseRoot/FitNesse/UserGuide/FitLibraryUserGuide/GridFixture/content.txt 1.33 KB
fbe3c2bb   Benjamin Renard   First commit
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
GridFixture checks that a grid of values in the table matches the values in a 2D array.

!|fitlibrary.specify.GridFixtureUnderTest|

|strings|
|a|b|
|c|d|

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:
|images|
|!img http://files/gameImages/wall.jpg |!img http://files/gameImages/space.jpg |!img http://files/gameImages/box.jpg |!img http://files/gameImages/space.jpg |!img http://files/gameImages/wall.jpg |

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("gameImages/wall.jpg"),
                new ImageNameGraphic("gameImages/space.jpg"),
                new ImageNameGraphic("gameImages/box.jpg"),
                new ImageNameGraphic("gameImages/space.jpg"),
                new ImageNameGraphic("gameImages/wall.jpg") }});
    }
}}}----

---- * ''Copyright (c) 2004, 2005 Rick Mugridge, Rimu Research.''
 * ''Released under the terms of the GNU General Public License version 2 or later.''