Class TestingLoggerAssert
-
- All Implemented Interfaces:
-
ch.qos.logback.core.Appender,ch.qos.logback.core.spi.ContextAware,ch.qos.logback.core.spi.FilterAttachable,ch.qos.logback.core.spi.LifeCycle
public class TestingLoggerAssert extends AppenderBase<E>- Since:
2023-11-01
trydofor
-
-
Constructor Summary
Constructors Constructor Description TestingLoggerAssert()
-
Method Summary
Modifier and Type Method Description static TestingLoggerAssertinstall()install, and add rules, start, then assert, finally uninstall. TestingLoggerAssertrule(String name, Predicate<ILoggingEvent> rule)Map<String, Integer>getAssertCount()intgetAssertCount(String name)voidassertCount(int min)StringmessageCount()voidresetAll()voidresetCount()voiduninstall()-
Methods inherited from class ch.qos.logback.core.AppenderBase
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, start, stop, toString -
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addInfo, addStatus, addWarn, getContext, getStatusManager, setContext -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
install
static TestingLoggerAssert install()
install, and add rules, start, then assert, finally uninstall.
-
rule
@Contract(value = "_,_->this") TestingLoggerAssert rule(String name, Predicate<ILoggingEvent> rule)
-
getAssertCount
Map<String, Integer> getAssertCount()
-
getAssertCount
int getAssertCount(String name)
-
assertCount
void assertCount(int min)
-
messageCount
String messageCount()
-
resetAll
void resetAll()
-
resetCount
void resetCount()
-
uninstall
void uninstall()
-
-
-
-