org.mod4j.runtime.aspects
Class LoggingAspectTest

java.lang.Object
  extended by org.mod4j.runtime.test.AbstractLoggingTest
      extended by org.mod4j.runtime.aspects.LoggingAspectTest

public class LoggingAspectTest
extends AbstractLoggingTest

Test for LoggingAspect.


Field Summary
 
Fields inherited from class org.mod4j.runtime.test.AbstractLoggingTest
logger, mockHandler
 
Constructor Summary
LoggingAspectTest()
           
 
Method Summary
protected  org.apache.commons.logging.Log getLog()
          The Log we'll work with.
 void setUp()
          Setup environment before tests.
 void testLogAfter()
          Test the LoggingAspect#logAfter(JoinPoint) method with loglevel set to 'all'.
 void testLogBefore()
          Test the LoggingAspect#logBefore(JoinPoint) method with loglevel set to 'all'.
 void testNoLogging()
          Test the LoggingAspect#logBefore(JoinPoint) AND LoggingAspect#logAfter(JoinPoint) methods with loglevel set to 'info', which should in nothing.
 
Methods inherited from class org.mod4j.runtime.test.AbstractLoggingTest
tearDown
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LoggingAspectTest

public LoggingAspectTest()
Method Detail

setUp

public void setUp()
Setup environment before tests. If subclasses override this method, don't forget to call super!

Overrides:
setUp in class AbstractLoggingTest

testLogAfter

public void testLogAfter()
Test the LoggingAspect#logAfter(JoinPoint) method with loglevel set to 'all'.


testLogBefore

public void testLogBefore()
                   throws java.lang.Throwable
Test the LoggingAspect#logBefore(JoinPoint) method with loglevel set to 'all'.

Throws:
java.lang.Throwable - Not expected.

testNoLogging

public void testNoLogging()
Test the LoggingAspect#logBefore(JoinPoint) AND LoggingAspect#logAfter(JoinPoint) methods with loglevel set to 'info', which should in nothing.


getLog

protected org.apache.commons.logging.Log getLog()
Description copied from class: AbstractLoggingTest
The Log we'll work with. Has to be implemented by the subclass.

Specified by:
getLog in class AbstractLoggingTest
Returns:
The Log for the target (which is this class).


Copyright © 2010 Mod4j. All Rights Reserved.