org.apache.commons.logging.config
Class PriorityConfigTestCase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.commons.logging.config.PriorityConfigTestCase
All Implemented Interfaces:
junit.framework.Test

public class PriorityConfigTestCase
extends junit.framework.TestCase

Tests that verify that the process of configuring logging on startup works correctly by selecting the file with the highest priority.

This test sets up a classpath where:

The result should be that the third file is used.

Note that parentFirst=true is used in this test because method PathableClassLoader.getResources always behaves as if parentFirst=true; see the PathableClassLoader javadoc for details.


Constructor Summary
PriorityConfigTestCase()
           
 
Method Summary
 void setUp()
          Set up instance variables required by this test case.
static junit.framework.Test suite()
          Return the tests included in this test suite.
 void tearDown()
          Tear down instance variables required by this test case.
 void testPriority()
          Verify that the config file being used is the one containing the desired configId value.
 
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

PriorityConfigTestCase

public PriorityConfigTestCase()
Method Detail

suite

public static junit.framework.Test suite()
                                  throws Exception
Return the tests included in this test suite.

Throws:
Exception

setUp

public void setUp()
           throws Exception
Set up instance variables required by this test case.

Overrides:
setUp in class junit.framework.TestCase
Throws:
Exception

tearDown

public void tearDown()
Tear down instance variables required by this test case.

Overrides:
tearDown in class junit.framework.TestCase

testPriority

public void testPriority()
                  throws Exception
Verify that the config file being used is the one containing the desired configId value.

Throws:
Exception


Copyright © 2001-2009 Apache Software Foundation. All Rights Reserved.