Interface MockLog.LoggingExpectation

All Known Implementing Classes:
MockLog.AbstractEventExpectation, MockLog.EventuallySeenEventExpectation, MockLog.ExceptionSeenEventExpectation, MockLog.PatternAndExceptionSeenEventExpectation, MockLog.PatternSeenEventExpectation, MockLog.SeenEventExpectation, MockLog.UnseenEventExpectation
Enclosing class:
MockLog

public static interface MockLog.LoggingExpectation
Keeps track of whether the LogEvent instances it receives match the expected content.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Returns if this expectation is matched, otherwise throws an AssertionError.
    default void
    awaitMatched(long millis)
    Returns if this expectation is matched within the given number of milliseconds, otherwise throws an AssertionError.
    void
    match(org.apache.logging.log4j.core.LogEvent event)
    Called on every LogEvent received by the captured appenders.
  • Method Details

    • match

      void match(org.apache.logging.log4j.core.LogEvent event)
      Called on every LogEvent received by the captured appenders.
    • assertMatched

      void assertMatched()
      Returns if this expectation is matched, otherwise throws an AssertionError.
    • awaitMatched

      default void awaitMatched(long millis) throws InterruptedException
      Returns if this expectation is matched within the given number of milliseconds, otherwise throws an AssertionError.
      Throws:
      InterruptedException