org.apache.commons.id.uuid.clock
Class SystemClockImplTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.id.uuid.clock.SystemClockImplTest
All Implemented Interfaces:
junit.framework.Test

public class SystemClockImplTest
extends junit.framework.TestCase

Unit tests for SystemClockImplTest.

Version:
$Revision: 480488 $ $Date: 2006-11-29 08:57:26 +0000 (Wed, 29 Nov 2006) $
Author:
Commons-Id team

Nested Class Summary
protected static class SystemClockImplTest.ClockClient
          Clock client thread
 
Field Summary
static java.lang.String SYS_OS_NAME_PROPERTY
          Constant for System.property os.name
static java.lang.String SYS_OS_WINDOWS
          Constant for Windows
 
Constructor Summary
SystemClockImplTest()
           
 
Method Summary
protected  void setUp()
           
 void testRange()
          Make sure that generated time stamps are within expected ranges.
 void testUnique()
          Make sure that time stamps generated by concurrent threads are unique.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, 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
 

Field Detail

SYS_OS_NAME_PROPERTY

public static final java.lang.String SYS_OS_NAME_PROPERTY
Constant for System.property os.name

See Also:
Constant Field Values

SYS_OS_WINDOWS

public static final java.lang.String SYS_OS_WINDOWS
Constant for Windows

See Also:
Constant Field Values
Constructor Detail

SystemClockImplTest

public SystemClockImplTest()
Method Detail

setUp

protected void setUp()
              throws java.lang.Exception
Overrides:
setUp in class junit.framework.TestCase
Throws:
java.lang.Exception

testUnique

public void testUnique()
                throws java.lang.Exception
Make sure that time stamps generated by concurrent threads are unique.

Throws:
java.lang.Exception - a testing exception.

testRange

public void testRange()
               throws java.lang.Exception
Make sure that generated time stamps are within expected ranges. Tolerance is now 1 seconds

Throws:
java.lang.Exception - any test Exception.


Copyright © 2003-2008 The Apache Software Foundation. All Rights Reserved.