|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectTestingKernel
public class TestingKernel
This class is the system's Testing Kernel. For now it is hard coded, sequential tests that will be performed. It tests the system and how it responds to such things as basic moves/jumps, illegal values, and illegal moves/jumps. All results will be outputted about pass/fail on the tests.
Field Summary | |
---|---|
java.lang.String |
playerOne
|
java.lang.String |
playerTwo
|
Board |
testBoard
|
Facade |
testFacade
|
int |
testTime
|
Driver |
theDriver
|
Constructor Summary | |
---|---|
TestingKernel(Driver aDriver)
The constructor for this kernel which calls the other methods. |
Method Summary | |
---|---|
void |
beginTests()
Tests the intial values, then call the other methods. |
static void |
main(java.lang.String[] args)
The main method. |
void |
report(boolean passFail,
java.lang.String name,
int tabs)
This method is for reporting. |
void |
setBegin()
Set the state of the game to initial settings. |
void |
simpleWait()
This method is a generic way to put in place an artificial wait into the program. |
boolean |
testBasicMoves()
Test basic moves made by the checkers. |
boolean |
testBounds()
This method will attempt to make moves with out of bound values to ensure the system detects these without throwing an OutOfBounds Exception. |
boolean |
testDraw()
Tests the actions of the GUI and checks to see that both players may offer draws and accept/decline. |
boolean |
testForcedJump()
Tests for the following: A jump is possible. |
boolean |
testInvalidMoves()
Testing of a variety of invalid moves. |
boolean |
testMultJumps()
When multiple jumps are present, this tests that they are forced and that the correct player keeps control of the game. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public Facade testFacade
public Driver theDriver
public Board testBoard
public int testTime
public java.lang.String playerOne
public java.lang.String playerTwo
Constructor Detail |
---|
public TestingKernel(Driver aDriver)
aFacade
- The facade to manipulate in this program.Method Detail |
---|
public static void main(java.lang.String[] args)
args
- Array of command line arguments.public void setBegin()
public void beginTests()
public boolean testBasicMoves()
public boolean testBounds()
public boolean testForcedJump()
public boolean testMultJumps()
public boolean testInvalidMoves()
public boolean testDraw()
public void report(boolean passFail, java.lang.String name, int tabs)
passFail
- Bool on whether or not test was passed.name
- Name of test.tabs
- The number of tabs to insertpublic void simpleWait()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |