FileDocCategorySizeDatePackage
HierarchyThresholdTestCase.javaAPI DocApache log4j 1.2.154124Sat Aug 25 00:09:34 BST 2007org.apache.log4j

HierarchyThresholdTestCase

public class HierarchyThresholdTestCase extends TestCase
Test the configuration of the hierarchy-wide threshold.
author
Ceki Gülcü

Fields Summary
static String
TEMP
static Logger
logger
Constructors Summary
public HierarchyThresholdTestCase(String name)


     
    super(name);
  
Methods Summary
static voidcommon()

    String oldThreadName = Thread.currentThread().getName();
    Thread.currentThread().setName("main");

    logger.log(XLevel.TRACE, "m0");
    logger.debug("m1");
    logger.info("m2");
    logger.warn("m3");
    logger.error("m4");
    logger.fatal("m5");

    Thread.currentThread().setName(oldThreadName);
  
public voidsetUp()

  
public static junit.framework.Testsuite()

    TestSuite suite = new TestSuite();
    suite.addTest(new HierarchyThresholdTestCase("test1"));
    suite.addTest(new HierarchyThresholdTestCase("test2"));
    suite.addTest(new HierarchyThresholdTestCase("test3"));
    suite.addTest(new HierarchyThresholdTestCase("test4"));
    suite.addTest(new HierarchyThresholdTestCase("test5"));
    suite.addTest(new HierarchyThresholdTestCase("test6"));
    suite.addTest(new HierarchyThresholdTestCase("test7"));
    suite.addTest(new HierarchyThresholdTestCase("test8"));
    return suite;
  
public voidtearDown()

    System.out.println("Tearing down test case.");
    logger.getLoggerRepository().resetConfiguration();
  
public voidtest1()

    PropertyConfigurator.configure("input/hierarchyThreshold1.properties");
    common();
    assertTrue(Compare.compare(TEMP, "witness/hierarchyThreshold.1"));
  
public voidtest2()

    PropertyConfigurator.configure("input/hierarchyThreshold2.properties");
    common();
    assertTrue(Compare.compare(TEMP, "witness/hierarchyThreshold.2"));
  
public voidtest3()

    PropertyConfigurator.configure("input/hierarchyThreshold3.properties");
    common();
    assertTrue(Compare.compare(TEMP, "witness/hierarchyThreshold.3"));
  
public voidtest4()

    PropertyConfigurator.configure("input/hierarchyThreshold4.properties");
    common();
    assertTrue(Compare.compare(TEMP, "witness/hierarchyThreshold.4"));
  
public voidtest5()

    PropertyConfigurator.configure("input/hierarchyThreshold5.properties");
    common();
    assertTrue(Compare.compare(TEMP, "witness/hierarchyThreshold.5"));
  
public voidtest6()

    PropertyConfigurator.configure("input/hierarchyThreshold6.properties");
    common();
    assertTrue(Compare.compare(TEMP, "witness/hierarchyThreshold.6"));
  
public voidtest7()

    PropertyConfigurator.configure("input/hierarchyThreshold7.properties");
    common();
    assertTrue(Compare.compare(TEMP, "witness/hierarchyThreshold.7"));
  
public voidtest8()

    PropertyConfigurator.configure("input/hierarchyThreshold8.properties");
    common();
    assertTrue(Compare.compare(TEMP, "witness/hierarchyThreshold.8"));