Rename tests directory for nosetests.

Remove cruft test Java stub classes.
This commit is contained in:
Dorian 2014-08-07 08:05:22 -04:00
parent 02dbdaa633
commit 6df858e7eb
8 changed files with 3 additions and 186 deletions

View File

@ -33,7 +33,7 @@ setup(
'web': gather_requirements('requirements/web.txt'),
},
packages=find_packages(exclude=['test']),
packages=find_packages(exclude=['tests']),
include_package_data=True,
entry_points={

View File

@ -1,40 +0,0 @@
/*****************************************************************************
AmericanGameTest.java -- Regression test of a game played according to
American rules.
*****************************************************************************
*****************************************************************************
This file is part of justCheckers.
justCheckers is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
justCheckers is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with justCheckers. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************/
package org.justcheckers.test.game;
/**
* Regression test for a game of checkers played according to American rules.
* American rules are:
* - 8x8 board.
* - Pawns can only move 1 space forward.
* - Kings can move 1 space forward or backwards.
* - The game ends when one player is eliminated or completely blocked.
*
* TestNG version: 5.10
*
* @author Dorian Pula
*
*/
public class AmericanGameTest {
//TODO: Populate with test cases.
}

View File

@ -1,37 +0,0 @@
/*****************************************************************************
GameLogicTest.java -- Unit tests related to the game engine.
*****************************************************************************
*****************************************************************************
This file is part of justCheckers.
justCheckers is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
justCheckers is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with justCheckers. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************/
package org.justcheckers.test.game;
/**
* Test the game engine logic. Tests if the game engine can manipulate the
* state of a game and its board, in accordance to the rules of the game. The
* set of rule change from variant to variant. These tests should check basic
* correctness of the game engine.
*
* TestNG version: 5.10
*
* @author Dorian Pula
*
*/
public class GameLogicTest {
//TODO: Populate with test cases.
}

View File

@ -1,67 +0,0 @@
/*****************************************************************************
GameStateTest.java -- Unit tests related to managing a game's state.
*****************************************************************************
*****************************************************************************
This file is part of justCheckers.
justCheckers is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
justCheckers is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with justCheckers. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************/
package org.justcheckers.test.game;
import org.justcheckers.game.Game;
import org.justcheckers.game.Rulebook;
import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
/**
* Test the game state logic. Tests the NQPOJO (not quite plain old Java
* objects) that handle the state of a game. This includes the Rulebook
* (that dictate what rules will be used for a game), the Board (that represents
* the state of the board, pieces, etc.) and the Game itself.
*
* TestNG version: 5.10
*
* @author dorianpula
*/
public class GameStateTest {
/** A test game of checkers. */
private Game testGame;
/**
* Sets up a rather plain game of checkers. Game is based on the American
* rules, to make life easier.
*/
@BeforeClass
public void setUp() {
this.testGame = new Game();
}
/**
* Test the rulebook of a default initialized game.
*/
@Test
public void testDefaultRulebookSetup() {
Rulebook testRules = this.testGame.getGameRules();
Assert.assertNull(testRules);
//TODO: Test the ruleset that is gets initialized properly.
}
//TODO: Populate with test cases.
}

View File

@ -1,41 +0,0 @@
/*****************************************************************************
InternationalGameTest.java -- Regression test of a game played according to
International rules.
*****************************************************************************
*****************************************************************************
This file is part of justCheckers.
justCheckers is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
justCheckers is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with justCheckers. If not, see <http://www.gnu.org/licenses/>.
*****************************************************************************/
package org.justcheckers.test.game;
/**
* Regression test for a game of checkers played according to International
* rules.
* International rules are:
* - 10x10 board.
* - Pawns can move 1 space forward.
* - Kings can move 1 space forward. But can capture backwards.
* - The game ends when one player is eliminated or completely blocked.
*
* TestNG version: 5.10
*
* @author Dorian Pula
*
*/
public class InternationalGameTest {
//TODO: Populate with test cases.
}

View File

2
tests/game/__init__.py Normal file
View File

@ -0,0 +1,2 @@
# TODO: Write full integration tests that mimic a full game of checkers of each variant.
# e.g. American, International, Polish...