Class StopWatchTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by StopWatchTest
All Implemented Interfaces:
junit.framework.Test

public class StopWatchTest
extends junit.framework.TestCase

The test class StopWatchTest.

Version:
July 2005
Author:
Todd A. Whittaker

Constructor Summary
StopWatchTest()
          Default constructor for test class StopWatchTest
 
Method Summary
protected  void setUp()
          Sets up the test fixture.
protected  void tearDown()
          Tears down the test fixture.
 void testCreateStopWatch()
          Checks that the constructor works, and puts the stopwatch in the right initial state
 void testStartingAndStopping()
          Checks that starting and stopping the watch works
 void testTimingAndResetting()
          Checks that the timer works to within DELTA milliseconds and that the watch can be reset.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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

StopWatchTest

public StopWatchTest()
Default constructor for test class StopWatchTest

Method Detail

setUp

protected void setUp()
Sets up the test fixture. Called before every test case method.

Overrides:
setUp in class junit.framework.TestCase

tearDown

protected void tearDown()
Tears down the test fixture. Called after every test case method.

Overrides:
tearDown in class junit.framework.TestCase

testCreateStopWatch

public void testCreateStopWatch()
Checks that the constructor works, and puts the stopwatch in the right initial state


testStartingAndStopping

public void testStartingAndStopping()
Checks that starting and stopping the watch works


testTimingAndResetting

public void testTimingAndResetting()
Checks that the timer works to within DELTA milliseconds and that the watch can be reset.