Class LogEventAssert

java.lang.Object
org.assertj.core.api.AbstractAssert<LogEventAssert, nl.altindag.log.model.LogEvent>
org.assertj.core.api.AbstractObjectAssert<LogEventAssert, nl.altindag.log.model.LogEvent>
nl.pim16aap2.testing.assertions.LogEventAssert
All Implemented Interfaces:
org.assertj.core.api.Assert<LogEventAssert, nl.altindag.log.model.LogEvent>, org.assertj.core.api.Descriptable<LogEventAssert>, org.assertj.core.api.ExtensionPoints<LogEventAssert, nl.altindag.log.model.LogEvent>

@NullMarked public class LogEventAssert extends org.assertj.core.api.AbstractObjectAssert<LogEventAssert, nl.altindag.log.model.LogEvent>
Represents an assertion class for LogEvent instances.

This class provides methods to assert various conditions on a log event, such as checking for the presence of a throwable, verifying the type of the throwable, and more.

  • Field Summary

    Fields inherited from class org.assertj.core.api.AbstractAssert

    actual, info, myself, objects, throwUnsupportedExceptionOnEquals
  • Method Summary

    Modifier and Type
    Method
    Description
    org.assertj.core.api.ThrowableAssert<?>
    Verifies that the log event has a throwable.
    <T extends Throwable>
    org.assertj.core.api.ThrowableAssert<T>
    hasThrowableExactlyOfType(Class<T> throwableType)
    Verifies that the log event has a throwable that is exactly of the given type.
    <T extends Throwable>
    org.assertj.core.api.ThrowableAssert<T>
    hasThrowableOfType(Class<T> throwableType)
    Verifies that the log event has a throwable that is an instance of the given type.

    Methods inherited from class org.assertj.core.api.AbstractObjectAssert

    as, as, doesNotReturn, extracting, extracting, extracting, extracting, extracting, extracting, extractingForProxy, getComparatorsByType, hasAllNullFieldsOrProperties, hasAllNullFieldsOrPropertiesExcept, hasFieldOrProperty, hasFieldOrPropertyWithValue, hasNoNullFieldsOrProperties, hasNoNullFieldsOrPropertiesExcept, hasOnlyFields, isEqualToComparingFieldByField, isEqualToComparingFieldByFieldRecursively, isEqualToComparingOnlyGivenFields, isEqualToIgnoringGivenFields, isEqualToIgnoringNullFields, newObjectAssert, returns, usingComparatorForFields, usingComparatorForType, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison

    Methods inherited from class org.assertj.core.api.AbstractAssert

    actual, areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, doesNotMatch, doesNotMatch, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, hasToString, hasToString, inBinary, inHexadecimal, is, isElementOfCustomAssert, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isInstanceOfSatisfying, isNot, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNull, isOfAnyClassIn, isSameAs, matches, matches, newListAssertInstance, overridingErrorMessage, overridingErrorMessage, satisfies, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, usingComparator, usingComparator, usingDefaultComparator, usingEquals, usingEquals, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.assertj.core.api.Descriptable

    as, describedAs, describedAs
  • Method Details

    • hasThrowable

      public org.assertj.core.api.ThrowableAssert<?> hasThrowable()
      Verifies that the log event has a throwable.
      Returns:
      A new ThrowableAssert containing the log event.
    • hasThrowableOfType

      public <T extends Throwable> org.assertj.core.api.ThrowableAssert<T> hasThrowableOfType(Class<T> throwableType)
      Verifies that the log event has a throwable that is an instance of the given type.
      Type Parameters:
      T - The type of the throwable to check for.
      Parameters:
      throwableType - The type of the throwable to check for.
      Returns:
      A ThrowableAssert for the throwable of the log event.
    • hasThrowableExactlyOfType

      public <T extends Throwable> org.assertj.core.api.ThrowableAssert<T> hasThrowableExactlyOfType(Class<T> throwableType)
      Verifies that the log event has a throwable that is exactly of the given type.
      Type Parameters:
      T - The type of the throwable to check for.
      Parameters:
      throwableType - The type of the throwable to check for.
      Returns:
      A ThrowableAssert for the throwable of the log event.