March 2018
Intermediate to advanced
324 pages
8h 30m
English
This requirement tells the system whether the game is finished.
There are two conditions to test. The first condition is that new game must be unfinished; the second condition is that full board games must be finished:
@Test
public void whenTheGameStartsItIsNotFinished() {
assertFalse("The game must not be finished", tested.isFinished());
}
@Test
public void whenNoDiscCanBeIntroducedTheGamesIsFinished() {
for (int row = 0; row < 6; row++)
for (int column = 0; column < 7; column++)
tested.putDiscInColumn(column);
assertTrue("The game must be finished", tested.isFinished());
}
An easy and simple solution to these two tests is ...
Read now
Unlock full access