FileDocCategorySizeDatePackage
SMTPAppenderTest.javaAPI DocApache log4j 1.2.152103Sat Aug 25 00:09:34 BST 2007org.apache.log4j.net

SMTPAppenderTest

public class SMTPAppenderTest extends TestCase
Tests for SMTPAppender.

Fields Summary
Constructors Summary
public SMTPAppenderTest(String testName)

        super(testName);
    
Methods Summary
public voidtearDown()
Reset configuration after every test.

      LogManager.resetConfiguration();
  
public voidtestTrigger()
Tests that triggeringPolicy element will set evaluator.

      DOMConfigurator.configure("input/xml/smtpAppender1.xml");
      SMTPAppender appender = (SMTPAppender) Logger.getRootLogger().getAppender("A1");
      TriggeringEventEvaluator evaluator = appender.getEvaluator();
      assertTrue(evaluator instanceof MockTriggeringEventEvaluator);