org.apache.log4j.rolling

## Class TimeBasedRollingTest

- java.lang.Object
- - junit.framework.Assert
  - - junit.framework.TestCase
    - - org.apache.log4j.rolling.TimeBasedRollingTest

- All Implemented Interfaces:
    junit.framework.Test

      public class TimeBasedRollingTest
      extends junit.framework.TestCase

  A rather exhaustive set of tests. Tests include leaving the ActiveFileName argument blank, or setting it, with and without compression, and tests with or without stopping/restarting the RollingFileAppender. The regression tests log a few times using a RollingFileAppender. Then, they predict the names of the files which sould be generated and compare them with witness files.

               Compression    ActiveFileName  Stop/Restart
       Test1      NO              BLANK          NO
       Test2      NO              BLANK          YES
       Test3      YES             BLANK          NO
       Test4      NO                SET          YES
       Test5      NO                SET          NO
       Test6      YES               SET          NO

  Author:
    Ceki Gülcü

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TimeBasedRollingTest(String name)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `setUp()`
    `void` | `tearDown()`
    `void` | `test1()` Test rolling without compression, activeFileName left blank, no stop/start
    `void` | `test2()` No compression, with stop/restart, activeFileName left blank
    `void` | `test3()` With compression, activeFileName left blank, no stop/restart
    `void` | `test4()` Without compression, activeFileName set, with stop/restart
    `void` | `test5()` No compression, activeFileName set, without stop/restart
    `void` | `test6()` With compression, activeFileName set, no stop/restart,
    `void` | `testWithJoran1()`
    `void` | `XXXtestWithJoran10()`

    - ### 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`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### TimeBasedRollingTest

          public TimeBasedRollingTest(String name)

  - ### Method Detail

    - #### setUp

          public void setUp()

      Overrides:
        `setUp` in class `junit.framework.TestCase`

    - #### tearDown

          public void tearDown()

      Overrides:
        `tearDown` in class `junit.framework.TestCase`

    - #### test1

          public void test1()
                     throws Exception

      Test rolling without compression, activeFileName left blank, no stop/start
      Throws:
        `Exception`

    - #### test2

          public void test2()
                     throws Exception

      No compression, with stop/restart, activeFileName left blank
      Throws:
        `Exception`

    - #### test3

          public void test3()
                     throws Exception

      With compression, activeFileName left blank, no stop/restart
      Throws:
        `Exception`

    - #### test4

          public void test4()
                     throws Exception

      Without compression, activeFileName set, with stop/restart
      Throws:
        `Exception`

    - #### test5

          public void test5()
                     throws Exception

      No compression, activeFileName set, without stop/restart
      Throws:
        `Exception`

    - #### test6

          public void test6()
                     throws Exception

      With compression, activeFileName set, no stop/restart,
      Throws:
        `Exception`

    - #### testWithJoran1

          public void testWithJoran1()
                              throws Exception

      Throws:
        `Exception`

    - #### XXXtestWithJoran10

          public void XXXtestWithJoran10()
                                  throws Exception

      Throws:
        `Exception`

Copyright © 2013 The Apache Software Foundation. Licensed under the Apache License, Version 2.0

Apache Extras for Apache log4j, Apache log4j and Apache are trademarks of the Apache Software Foundation.