org.apache.log4j.pattern

## Class FormattingInfoTest

- java.lang.Object
- - junit.framework.Assert
  - - junit.framework.TestCase
    - - org.apache.log4j.pattern.FormattingInfoTest

- All Implemented Interfaces:
    junit.framework.Test

      public class FormattingInfoTest
      extends junit.framework.TestCase

  Tests for ExtrasFormattingInfo.
  Author:
    Curt Arnold

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `FormattingInfoTest(String name)` Create a new instance.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `testConstructor()` Check constructor
    `void` | `testGetDefault()` Check that getDefault does not return null.
    `void` | `testPadLeft()` Add padding to left since field is not minimum width.
    `void` | `testPadRight()` Add padding to right since field is not minimum width.
    `void` | `testRightTruncate()` Field exceeds maximum width, truncate right.
    `void` | `testTruncate()` Field exceeds maximum width

    - ### Methods inherited from class junit.framework.TestCase

      `countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, 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`

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

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

- - ### Constructor Detail

    - #### FormattingInfoTest

          public FormattingInfoTest(String name)

      Create a new instance.
      Parameters:
        `name` - test name

  - ### Method Detail

    - #### testGetDefault

          public void testGetDefault()

      Check that getDefault does not return null.

    - #### testConstructor

          public void testConstructor()

      Check constructor

    - #### testTruncate

          public void testTruncate()

      Field exceeds maximum width

    - #### testRightTruncate

          public void testRightTruncate()

      Field exceeds maximum width, truncate right.

    - #### testPadLeft

          public void testPadLeft()

      Add padding to left since field is not minimum width.

    - #### testPadRight

          public void testPadRight()

      Add padding to right since field is not minimum width.

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.