Skip to content

Instantly share code, notes, and snippets.

@tarynsauer
Created January 12, 2014 22:00
Show Gist options
  • Save tarynsauer/8391180 to your computer and use it in GitHub Desktop.
Save tarynsauer/8391180 to your computer and use it in GitHub Desktop.
import org.junit.Before;
import org.junit.Test;
import java.util.Arrays;
import static org.junit.Assert.assertEquals;
public class HumanPlayerTest {
private HumanPlayer player;
private Board board;
@Before
public void setUp() throws Exception {
player = new HumanPlayer("X");
board = new Board();
}
@Test
public void testAddMarker() {
player.addMarker(board, 1);
String actualResult = Arrays.deepToString(board.getCells());
assertEquals("[X, 2, 3, 4, 5, 6, 7, 8, 9]", actualResult);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment