|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
viewguitest.GameTimerTest
public class GameTimerTest
Some tests for the GameTimer, hard to do because it is a timer. A lot of tests are done in TimerLabelTest.
| Constructor Summary | |
|---|---|
GameTimerTest(String name)
|
|
| Method Summary | |
|---|---|
void |
initializeTimers()
|
void |
testConstructor()
Tests to see if the constructor is able to create valid GameTimers without throwing errors. |
void |
testInitialGetTime()
Tests that retrieving the initial time works Tests getTime() without running the GameTimers |
void |
testIsRunning()
Tests isRunning() |
void |
testSetGetTime()
Tests setTime() and getTime() while not running |
void |
testStart()
Naive start test to see if the start() Works by calling start() and waiting after the timers should be run down to check if the timers have 0 remaining on them. |
void |
testStop()
Naive start test to see if the stop() Works by calling start() and waiting a very short time, stop it and then waiting until the timers would run down to zero. |
| Methods inherited from class junit.framework.TestCase |
|---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown, toString |
| 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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public GameTimerTest(String name)
| Method Detail |
|---|
public void initializeTimers()
public void testConstructor()
public void testInitialGetTime()
public void testStart()
public void testStop()
public void testIsRunning()
public void testSetGetTime()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||