antichess
Class TestCylinder

java.lang.Object
junit.framework.Assert
junit.framework.TestCase
antichess.TestCylinder
- All Implemented Interfaces:
- junit.framework.Test
- public class TestCylinder
- extends junit.framework.TestCase
Tests the Cylindrical board
| Fields inherited from class junit.framework.TestCase |
|
| Methods inherited from class junit.framework.Assert |
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail |
testfilesFile
java.lang.String testfilesFile
testfilesDir
java.lang.String testfilesDir
testEndGameFile
java.lang.String testEndGameFile
testEndGameDir
java.lang.String testEndGameDir
TestCylinder
public TestCylinder(java.lang.String name)
linesToSortedList
private java.util.List linesToSortedList(java.lang.String s)
- Converts a string of line into a List of sorted strings
fileRead
private java.lang.String fileRead(java.lang.String filename,
boolean readAll)
- This function only returns all text before the first ";"
and sets comments to contain all text after the first ";"
setUp
protected void setUp()
- Description copied from class:
junit.framework.TestCase
- Sets up the fixture, for example, open a network connection.
This method is called before a test is executed.
testMakeMove
public void testMakeMove()
- Tests making a move and updating of the board
testUndoMove
public void testUndoMove()
- Tests undoing a move after making a move and updating of the board
testIsValidMove
public void testIsValidMove()
- Tests if a move is valid. The move is specified after the first semicolon
in the file, and ends with a second semicolon. The expected answer is
true/false, and ends with a semicolon too;
testEndGame
public void testEndGame()
- Tests for end game conditions. The first semicolon is the end of boardinfo
in the file. The line after board info gives true/false ending with the second
semicolon indicating if the game is over or not.
The line after that is true/false indicating if the game is a draw or not, and
ends with a third semicolon;
suite
public static junit.framework.Test suite()