org.apache.log4j
Class LayoutTest

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.log4j.LayoutTest
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
EnhancedPatternLayoutTest, XSLTLayoutTest

public class LayoutTest
extends junit.framework.TestCase

Tests for Layout.


Constructor Summary
  LayoutTest(java.lang.String testName)
          Construct a new instance of LayoutTest.
protected LayoutTest(java.lang.String testName, java.lang.String expectedContentType, boolean expectedIgnoresThrowable, java.lang.String expectedHeader, java.lang.String expectedFooter)
          Constructor for use by derived tests.
 
Method Summary
protected  Layout createLayout()
          Creates layout for test.
 void testFormat()
          Tests format.
 void testGetContentType()
          Tests getContentType.
 void testGetFooter()
          Tests getFooter.
 void testGetHeader()
          Tests getHeader.
 void testIgnoresThrowable()
          Tests ignoresThrowable.
 void testLineSep()
          Tests Layout.LINE_SEP.
 void testLineSepLen()
          Tests Layout.LINE_SEP.
 
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

LayoutTest

public LayoutTest(java.lang.String testName)
Construct a new instance of LayoutTest.

Parameters:
testName - test name.

LayoutTest

protected LayoutTest(java.lang.String testName,
                     java.lang.String expectedContentType,
                     boolean expectedIgnoresThrowable,
                     java.lang.String expectedHeader,
                     java.lang.String expectedFooter)
Constructor for use by derived tests.

Parameters:
testName - name of test.
expectedContentType - expected value for getContentType().
expectedIgnoresThrowable - expected value for ignoresThrowable().
expectedHeader - expected value for getHeader().
expectedFooter - expected value for getFooter().
Method Detail

testLineSep

public void testLineSep()
Tests Layout.LINE_SEP.


testLineSepLen

public void testLineSepLen()
Tests Layout.LINE_SEP.


createLayout

protected Layout createLayout()
Creates layout for test.

Returns:
new instance of Layout.

testGetContentType

public void testGetContentType()
Tests getContentType.


testIgnoresThrowable

public void testIgnoresThrowable()
Tests ignoresThrowable.


testGetHeader

public void testGetHeader()
Tests getHeader.


testGetFooter

public void testGetFooter()
Tests getFooter.


testFormat

public void testFormat()
                throws java.lang.Exception
Tests format.

Throws:
java.lang.Exception - derived tests, particular XMLLayoutTest, may throw exceptions.


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.