org.apache.log4j.pattern
Class FormattingInfoTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.log4j.pattern.FormattingInfoTest
All Implemented Interfaces:
junit.framework.Test

public class FormattingInfoTest
extends junit.framework.TestCase

Tests for FormattingInfo.

Author:
Curt Arnold

Constructor Summary
FormattingInfoTest(java.lang.String name)
          Create a new instance.
 
Method Summary
 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(java.lang.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 © 2010 The Apache Software Foundation. Licensed under the Apache License, Version 2.0

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