|
|||||
FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Helper class to spoof log entries as produced by calling arbitrary code. This allows non-intrusive testing of dependent objects without explicitly using Mock objects as long as those dependent objects do some proper logging. As a measure of last resort, it can be used on MetaClass to spoof it's log entries on 'invokeMethod'.
Constructor Summary | |
GroovyLogTestCase()
|
Method Summary | |
---|---|
static String |
stringLog(Level level, String qualifier, Closure yield)
Execute the given Closure with the according level for the Logger that is qualified by the qualifier and return the log output as a String. |
static def |
withLevel(Level level, String qualifier, Closure yield)
Execute the given Closure with the according level for the Logger that is qualified by the qualifier. |
Constructor Detail |
---|
GroovyLogTestCase()
Method Detail |
---|
public static String stringLog(Level level, String qualifier, Closure yield)
public static def withLevel(Level level, String qualifier, Closure yield)