|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.apache.commons.logging.AltHashtableTestCase
public class AltHashtableTestCase
Test the ability to force the LogFactory class to use some arbitrary Hashtable implementation to store its mapping from context-classloader -> LogFactory object.
This is done by
Constructor Summary | |
---|---|
AltHashtableTestCase()
|
Method Summary | |
---|---|
void |
setUp()
Set up before each test. |
static junit.framework.Test |
suite()
|
void |
testPutCalled()
Verify that when LogFactory sees a context-classloader for the first time that it creates a new entry in the LogFactory.factories hashmap. |
void |
testType()
Verify that initialising the LogFactory class will cause it to instantiate an object of type specified in system property "org.apache.commons.logging.LogFactory.HashtableImpl". |
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, failNotEquals, failNotSame, failSame, format |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AltHashtableTestCase()
Method Detail |
---|
public static junit.framework.Test suite() throws Exception
Exception
public void setUp()
This method ensures that the appropriate system property is defined to force the LogFactory class to use the AltHashtable class as its Hashtable implementation for storing factories in.
This does make the assumption that whatever JVM we are running in doesn't initialise classes until they are actually referenced (ie the LogFactory class hasn't been initialised before this method is called). This is true of all JVMs I know of; and if it isn't then this test will fail and someone will tell us.
setUp
in class junit.framework.TestCase
public void testType()
public void testPutCalled() throws Exception
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |