March 2018
Intermediate to advanced
324 pages
8h 30m
English
Now that we know that pieces are placed within the board's boundaries, we should make sure that they can be placed only on unoccupied spaces:
@Test
public void whenOccupiedThenRuntimeException() {
ticTacToe.play(2, 1);
exception.expect(RuntimeException.class);
ticTacToe.play(2, 1);
}
That's it; this was our last test. Once the implementation is finished, we can consider the first requirement as done.
Read now
Unlock full access