Class InMemoryAppenderAssertions

java.lang.Object
org.kiwiproject.beta.test.logback.InMemoryAppenderAssertions

@Beta @Deprecated(since="1.3.0", forRemoval=true) @KiwiDeprecated(removeAt="2.0.0", replacedBy="InMemoryAppenderAssertions in kiwi-test 3.2.0", reference="https://github.com/sleberknight/kiwi-beta/issues/422") public class InMemoryAppenderAssertions extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
replaced by InMemoryAppenderAssertions in kiwi-test 3.2.0. Will be removed in version 2.0.0.
Provides AssertJ assertions for InMemoryAppender.
  • Method Summary

    Modifier and Type
    Method
    Description
    List<ch.qos.logback.classic.spi.ILoggingEvent>
    Deprecated, for removal: This API element is subject to removal in a future version.
    A terminal method if you want to get the actual logging events after performing assertions, for example, to perform additional inspections.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Begin assertions for an InMemoryAppender.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Assert this appender contains the given message at least once (but possibly more than once).
    hasNumberOfLoggingEvents(int expectedEventCount)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Assert this appender has the expected number of logging events, and if the assertion succeeds, return this instance to continue chaining assertions.
    List<ch.qos.logback.classic.spi.ILoggingEvent>
    hasNumberOfLoggingEventsAndGet(int expectedEventCount)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Assert this appender has the expected number of logging events, and if the assertion succeeds, return a list containing those events.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • assertThat

      public static InMemoryAppenderAssertions assertThat(InMemoryAppender appender)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Begin assertions for an InMemoryAppender.
      Parameters:
      appender - the appender to assert against
      Returns:
      a new InMemoryAppenderAssertions instance
    • hasNumberOfLoggingEventsAndGet

      public List<ch.qos.logback.classic.spi.ILoggingEvent> hasNumberOfLoggingEventsAndGet(int expectedEventCount)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Assert this appender has the expected number of logging events, and if the assertion succeeds, return a list containing those events.
      Returns:
      a List containing the logging events
    • hasNumberOfLoggingEvents

      public InMemoryAppenderAssertions hasNumberOfLoggingEvents(int expectedEventCount)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Assert this appender has the expected number of logging events, and if the assertion succeeds, return this instance to continue chaining assertions.
      Returns:
      this instance
    • containsMessage

      public InMemoryAppenderAssertions containsMessage(String message)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Assert this appender contains the given message at least once (but possibly more than once).
      Parameters:
      message - the exact message to find
      Returns:
      this instance
    • andGetOrderedEvents

      public List<ch.qos.logback.classic.spi.ILoggingEvent> andGetOrderedEvents()
      Deprecated, for removal: This API element is subject to removal in a future version.
      A terminal method if you want to get the actual logging events after performing assertions, for example, to perform additional inspections. Does not perform any assertions.
      Returns:
      a List containing the logging events