Skip to content

4.1.0 - times(...), atMost(...), atLeast(...) and once()

Latest
Compare
Choose a tag to compare
@waschmittel waschmittel released this 03 Feb 14:08
· 5 commits to master since this release
f281b75
  • Feature: Added method to test number of log message repetitions via times(...), once(), atMost(...) and atLeast(...) (thanks @Laksuh)
  • Improvement: Better readability of assertion messages

Example

assertion message before:

Expected log message has occurred, but never with the expected MDC value: Level: WARN, Regex: "bye world"
captured message: "bye world"
expected MDC key: another_key
expected MDC value: ".*another_value.*"
captured MDC values:"
  key: "value"

assertion message now:

Expected log message has occurred, but never with the expected MDC value:
message: WARN "bye world" (regex)
  captured message: "bye world"
  expected MDC key: another_key
  expected MDC value: ".*another_value.*"
  captured MDC values:
    key: "value"