Now it's time to work on the specification of which player is about to play his turn.
We can split this requirement into three tests:
- The first turn should be played by player X
- If the last turn was played by X, then the next turn should be played by O
- If the last turn was played by O, then the next turn should be played by X
Until this moment, we haven't used any of the JUnit's asserts. To use them, we need to import the static methods from the org.junit.Assert class:
import static org.junit.Assert.*;
In their essence, methods inside the Assert class are very simple. Most of them start with assert. For example, assertEquals compares ...