@Test
public void testOpenAllFlaggedOrBomb() {

    flag(0, 0);
    bomb(0, 1);
    itsBoard.openAllFlaggedOrBomb();
    Point dimension = itsBoard.getDimension();
    int count = 0;
    for (int i = 0; i < dimension.x; i++)
        for (int j = 0; j < dimension.y; j++) {
            IField field = itsBoard.getField(i, j);
            if (field.isOpen()) {
                count++;
                assertTrue(field.isFlagged() || field.isBomb());
            }
        }
    assertEquals(2, count);
}