Test – X plays right after O

Finally, we can check whether X's turn comes after O played.


If the last turn was played by O, then the next turn should be played by X.

There's nothing to do to fulfill this test and, therefore, the test is useless and should be discarded. If you write this test, you'll discover that it is a false positive. It would pass without changing the implementation; try it out. Write this test and if it is successful without writing any implementation code, discard it.

The source code can be found in the 02-next-player branch of the tdd-java-ch03-tic-tac-toe Git repository at https://bitbucket.org/vfarcic/tdd-java-ch03-tic-tac-toe/branch/02-next-player.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.249.92