org.apache.jcs.utils.key
Class KeyGeneratorUtilUnitTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.jcs.utils.key.KeyGeneratorUtilUnitTest
All Implemented Interfaces:
junit.framework.Test

public class KeyGeneratorUtilUnitTest
extends junit.framework.TestCase

Tests for the Key Generator Util.


Constructor Summary
KeyGeneratorUtilUnitTest()
           
 
Method Summary
 void testGetDateFromQueryId_exact()
          Verify that we get the right date out.
 void testGetDateFromQueryId_null()
          Verify that we get an error if it is null
 void testGetDateFromQueryId_over()
          Verify that we get the right date out.
 void testGetDateFromQueryId_tooSmall()
          Verify that we get an error if it is too small
 void testGetNextRequestCounter_delay()
          Verify that the counter is reset if we set the interval vey low.
 void testGetNextRequestCounter_simple()
          Reset and verify that we get 1;
 void testGetNextRequestCounter_twice()
          Reset, call twice, and verify that we get 2;
 void testGetQueryId_SytemLeadNumber_Good()
          Creates a query id.
 void testGetQueryId_SytemLeadNumber_Nan()
          Creates a query id.
 void testGetQueryId()
          Creates a query id.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, 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
 

Constructor Detail

KeyGeneratorUtilUnitTest

public KeyGeneratorUtilUnitTest()
Method Detail

testGetQueryId_SytemLeadNumber_Good

public void testGetQueryId_SytemLeadNumber_Good()
Creates a query id. Verify that we lead with the system lead.


testGetQueryId_SytemLeadNumber_Nan

public void testGetQueryId_SytemLeadNumber_Nan()
Creates a query id. Verify that we lead with the default if the system lead is junk.


testGetQueryId

public void testGetQueryId()
Creates a query id.


testGetDateFromQueryId_exact

public void testGetDateFromQueryId_exact()
Verify that we get the right date out. This has just the leading 9 and the date.


testGetDateFromQueryId_over

public void testGetDateFromQueryId_over()
Verify that we get the right date out. This has the leading 9, the date, and more


testGetDateFromQueryId_tooSmall

public void testGetDateFromQueryId_tooSmall()
Verify that we get an error if it is too small


testGetDateFromQueryId_null

public void testGetDateFromQueryId_null()
Verify that we get an error if it is null


testGetNextRequestCounter_simple

public void testGetNextRequestCounter_simple()
Reset and verify that we get 1;


testGetNextRequestCounter_twice

public void testGetNextRequestCounter_twice()
Reset, call twice, and verify that we get 2;


testGetNextRequestCounter_delay

public void testGetNextRequestCounter_delay()
Verify that the counter is reset if we set the interval vey low.



Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.