org.davesag.generica.test
Class StructureTest

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.davesag.generica.test.StructureTest
All Implemented Interfaces:
Serializable, Test

public class StructureTest
extends TestCase
implements Serializable

StructureTest is collection of all of the tests on fundamental, structural parts of the code. It also provides handy reminders of the things i often forget exactly how to do.

Since:
Generica 1.0
Version:
CVS Revision $Id: StructureTest.java,v 1.10 2004/03/30 13:00:43 davesag Exp $
Author:
Dave Sag http://www.davesag.com
See Also:
Serialized Form

Constructor Summary
StructureTest()
          null constructor
StructureTest(String name)
          Constructor that takes a test name.
 
Method Summary
static Test suite()
          suite of tests
 void testArraysEqual()
          just test that we can compare two arrays okay
 void testDateFormats()
          tests that we can parse dates and times
 void testLeftSubstring()
          tests that given a string "1,2" we can extract the substring"1".
 void testMapOverride()
          tests that if you overrode one map with another the elements are overwritten.
 void testRightSubstring()
          tests that given a string "1,2" we can extract the substring"2".
 void testUUIDGeneration()
          Tests that we can create as many unique user ids as memory will allow and it won't ever repeat.
 String toString()
          test name
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, tearDown
 
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

StructureTest

public StructureTest()
null constructor


StructureTest

public StructureTest(String name)
Constructor that takes a test name.

Parameters:
name - the name of this suite of tests
Method Detail

testLeftSubstring

public void testLeftSubstring()
tests that given a string "1,2" we can extract the substring"1".


testRightSubstring

public void testRightSubstring()
tests that given a string "1,2" we can extract the substring"2".


testArraysEqual

public void testArraysEqual()
just test that we can compare two arrays okay


testDateFormats

public void testDateFormats()
tests that we can parse dates and times


testMapOverride

public void testMapOverride()
tests that if you overrode one map with another the elements are overwritten.


testUUIDGeneration

public void testUUIDGeneration()
Tests that we can create as many unique user ids as memory will allow and it won't ever repeat. I have tried this up to over 1,000,000 iterations. It has been set to the lower threshold of 1000 now we are confident it works. But feel free to retest at higher thresholds.


suite

public static Test suite()
suite of tests

Returns:
test suite

toString

public String toString()
test name

Returns:
name of test


Dave Sag Generica API version 0.5.9 - (prerelease) Copyright 2003 - 2004 Dave Sag.