|
||||||||||
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.security.SecurityAllowedTestCase
public class SecurityAllowedTestCase
Tests for logging with a security policy that allows JCL access to everything.
This class has only one unit test, as we are (in part) checking behaviour in the static block of the LogFactory class. As that class cannot be unloaded after being loaded into a classloader, the only workaround is to use the PathableClassLoader approach to ensure each test is run in its own classloader, and use a separate testcase class for each test.
Nested Class Summary | |
---|---|
static class |
SecurityAllowedTestCase.CustomHashtable
|
Constructor Summary | |
---|---|
SecurityAllowedTestCase()
|
Method Summary | |
---|---|
void |
setUp()
|
static junit.framework.Test |
suite()
Return the tests included in this test suite. |
void |
tearDown()
|
void |
testAllAllowed()
Test what happens when JCL is run with all permissions enabled. |
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, failNotEquals, failNotSame, failSame, format |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SecurityAllowedTestCase()
Method Detail |
---|
public static junit.framework.Test suite() throws Exception
Exception
public void setUp()
setUp
in class junit.framework.TestCase
public void tearDown()
tearDown
in class junit.framework.TestCase
public void testAllAllowed()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |