org.apache.commons.id.uuid.state
Class NodeTest

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

public class NodeTest
extends junit.framework.TestCase

Unit tests for Node.

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

Constructor Summary
NodeTest()
           
 
Method Summary
protected  void setUp()
           
protected  void tearDown()
           
 void testEqualsObject()
          Test for boolean equals(Object)
 void testGetClockSequence()
          Test for short getClockSequence.
 void testGetLastTimestamp()
          Test for getLastTimestamp.
 void testGetNodeIdentifier()
          Test for byte[] getNodeIdentifier
 void testGetUUIDTime()
          Test for long getUUIDTime
 void testHashCode()
          Tests the Node hashCode contract - for same id return same hashCode.
 void testNodebyteArray()
          Test for constructor Node(byte[])
 void testNodebyteArraylongshort()
          Test for constructor Node(byte[], long, short)
 
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

NodeTest

public NodeTest()
Method Detail

setUp

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

tearDown

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

testHashCode

public void testHashCode()

Tests the Node hashCode contract - for same id return same hashCode.


testNodebyteArray

public void testNodebyteArray()
                       throws java.lang.Exception

Test for constructor Node(byte[])

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

testNodebyteArraylongshort

public void testNodebyteArraylongshort()
Test for constructor Node(byte[], long, short)


testGetNodeIdentifier

public void testGetNodeIdentifier()
Test for byte[] getNodeIdentifier


testGetClockSequence

public void testGetClockSequence()

Test for short getClockSequence.


testGetUUIDTime

public void testGetUUIDTime()
                     throws java.lang.Exception
Test for long getUUIDTime

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

testEqualsObject

public void testEqualsObject()
Test for boolean equals(Object)


testGetLastTimestamp

public void testGetLastTimestamp()
                          throws java.lang.Exception
Test for getLastTimestamp.

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


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