Class GuidTests

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--GuidTests
All Implemented Interfaces:
junit.framework.Test

public class GuidTests
extends junit.framework.TestCase

Tester class for the Guid object


Constructor Summary
GuidTests(java.lang.String name)
          Constructs a test suite with the given name
 
Method Summary
static void main(java.lang.String[] args)
          runs the test suite
static junit.framework.Test suite()
          Assembles and returns a test suite for all the test methods of this test case.
 void testBinaryConstructor()
          tests the case where the Guid is constructed from a byte array
 void testBinaryConstructorBad()
          tests the case where the Guid is constructed from a bad byte array
 void testClone()
          tests the cloning and equals functionality
 void testDefaultConstructor()
          tests the default constructor
 void testGetBytes()
          tests the getBytes method
 void testHashing()
          tests the hashCode functionality.
 void testNewInstance()
          tests the newInstance function
 void testNotEquals()
          tests the equals method
 void testStringConstructor()
          tests the case where a guid is constructed from a valid string
 void testStringConstructorBad()
          tests the case where we are trying to construct a guid from a string with invalid characters
 void testStringConstructorBadLen()
          tests the case where we are trying to construct a guid from a string with insufficient length.
 void testStringConstructorLower()
          tests the case where a guid is constructed from a valid string with some of the valid hexadecimal characters in lowercase
 void testToString()
          tests the toString method
 
Methods inherited from class junit.framework.TestCase
countTestCases, name, run, run, runBare, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, fail, fail
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GuidTests

public GuidTests(java.lang.String name)
Constructs a test suite with the given name
Parameters:
name - the name of the test suite
Method Detail

suite

public static junit.framework.Test suite()
Assembles and returns a test suite for all the test methods of this test case.
Returns:
A non-null test suite.

main

public static void main(java.lang.String[] args)
runs the test suite
Parameters:
args - the command line arguments for the test

testDefaultConstructor

public void testDefaultConstructor()
tests the default constructor

testStringConstructor

public void testStringConstructor()
tests the case where a guid is constructed from a valid string

testStringConstructorLower

public void testStringConstructorLower()
tests the case where a guid is constructed from a valid string with some of the valid hexadecimal characters in lowercase

testStringConstructorBad

public void testStringConstructorBad()
tests the case where we are trying to construct a guid from a string with invalid characters

testStringConstructorBadLen

public void testStringConstructorBadLen()
tests the case where we are trying to construct a guid from a string with insufficient length.

testBinaryConstructor

public void testBinaryConstructor()
tests the case where the Guid is constructed from a byte array

testBinaryConstructorBad

public void testBinaryConstructorBad()
tests the case where the Guid is constructed from a bad byte array

testGetBytes

public void testGetBytes()
tests the getBytes method

testToString

public void testToString()
tests the toString method

testNotEquals

public void testNotEquals()
tests the equals method

testClone

public void testClone()
tests the cloning and equals functionality

testNewInstance

public void testNewInstance()
tests the newInstance function

testHashing

public void testHashing()
tests the hashCode functionality. This function tests the hashCode function as well as the equals function.