public class PlayersTest
extends java.lang.Object
Test class for testing Players.
| Modifier and Type | Field and Description |
|---|---|
(package private) Players |
testPlayer
testPlayer
Instantiation of a test player
|
| Constructor and Description |
|---|
PlayersTest() |
| Modifier and Type | Method and Description |
|---|---|
void |
testAddPlayer() |
void |
testNext()
testNext
Testing next() by adding three new players and calling next().
|
Players testPlayer
Instantiation of a test player
public void testAddPlayer()
public void testNext()
Testing next() by adding three new players and calling next(). Each time next() is called the current player is set to the next one. If the last player in the list is reached the next one will be the first in one the list, like: 3 players means alternating through 0-1-2-0-1-2-0-...