org.apache.log4j.rule
Class EqualsRuleTest

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

public class EqualsRuleTest
extends junit.framework.TestCase

Test for EqualsRule.


Constructor Summary
EqualsRuleTest(java.lang.String testName)
          Create new test.
 
Method Summary
 void test1()
          getRule() with only one entry on stack should throw IllegalArgumentException.
 void test2()
          getRule() with bad field name should throw IllegalArgumentException.
 void test3()
          getRule with "level" and "info" should return a LevelEqualsRule.
 void test4()
          getRule with "timestamp" and time should return a TimestampEqualsRule.
 void test5()
          getRule with "msg" should return an EqualsRule.
 void test6()
          getRule with "msg" should return an EqualsRule.
 void test7()
          Check EqualsRule serialization.
 
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

EqualsRuleTest

public EqualsRuleTest(java.lang.String testName)
Create new test.

Parameters:
testName - test name.
Method Detail

test1

public void test1()
getRule() with only one entry on stack should throw IllegalArgumentException.


test2

public void test2()
getRule() with bad field name should throw IllegalArgumentException.


test3

public void test3()
getRule with "level" and "info" should return a LevelEqualsRule.


test4

public void test4()
getRule with "timestamp" and time should return a TimestampEqualsRule.


test5

public void test5()
getRule with "msg" should return an EqualsRule.


test6

public void test6()
getRule with "msg" should return an EqualsRule.


test7

public void test7()
           throws java.io.IOException,
                  java.lang.ClassNotFoundException
Check EqualsRule serialization.

Throws:
java.io.IOException
java.lang.ClassNotFoundException


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.