Class ObservationRegistryAssert<SELF extends ObservationRegistryAssert<SELF,ACTUAL>,ACTUAL extends io.micrometer.observation.ObservationRegistry>

java.lang.Object
org.assertj.core.api.AbstractAssert<SELF,ACTUAL>
io.micrometer.observation.tck.ObservationRegistryAssert<SELF,ACTUAL>
All Implemented Interfaces:
org.assertj.core.api.Assert<SELF,ACTUAL>, org.assertj.core.api.Descriptable<SELF>, org.assertj.core.api.ExtensionPoints<SELF,ACTUAL>
Direct Known Subclasses:
TestObservationRegistryAssert

public class ObservationRegistryAssert<SELF extends ObservationRegistryAssert<SELF,ACTUAL>,ACTUAL extends io.micrometer.observation.ObservationRegistry> extends org.assertj.core.api.AbstractAssert<SELF,ACTUAL>
Assertion methods for MeterRegistrys.

To create a new instance of this class, invoke assertThat(ObservationRegistry) or then(ObservationRegistry).

Since:
1.10.0
  • Field Summary

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

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

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
     
  • Method Summary

    Modifier and Type
    Method
    Description
    assertThat(io.micrometer.observation.ObservationRegistry actual)
    Creates the assert object for ObservationRegistry.
    Verifies that there's no current Observation left in the ObservationRegistry.
    Verifies that there's no current Observation.Scope left in the ObservationRegistry.
    doesNotHaveRemainingCurrentObservationSameAs(io.micrometer.observation.Observation observation)
    Verifies that there's no current Observation left in the ObservationRegistry.
    doesNotHaveRemainingCurrentScopeSameAs(io.micrometer.observation.Observation.Scope scope)
    Verifies that the current Observation.Scope in the ObservationRegistry is not the same as the provided scope.
    Verifies that there's a current Observation left in the ObservationRegistry.
    hasRemainingCurrentObservationSameAs(io.micrometer.observation.Observation observation)
    Verifies that there's a current Observation left in the ObservationRegistry.
    Verifies that there's a current Observation.Scope left in the ObservationRegistry.
    hasRemainingCurrentScopeSameAs(io.micrometer.observation.Observation.Scope scope)
    Verifies that the current Observation.Scope in the ObservationRegistry is the same instance as the provided scope.
    then(io.micrometer.observation.ObservationRegistry actual)
    Creates the assert object for ObservationRegistry.

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

    areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, has, hashCode, hasSameClassAs, hasSameHashCodeAs, 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, usingRecursiveAssertion, usingRecursiveAssertion, usingRecursiveComparison, usingRecursiveComparison, withFailMessage, withFailMessage, withRepresentation, withThreadDumpOnError

    Methods inherited from class java.lang.Object

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

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

    as, as, as, describedAs
  • Constructor Details

    • ObservationRegistryAssert

      protected ObservationRegistryAssert(ACTUAL actual)
    • ObservationRegistryAssert

      protected ObservationRegistryAssert(ACTUAL actual, Class<SELF> clazz)
  • Method Details

    • assertThat

      public static ObservationRegistryAssert assertThat(io.micrometer.observation.ObservationRegistry actual)
      Creates the assert object for ObservationRegistry.
      Parameters:
      actual - observation registry to assert against
      Returns:
      meter registry assertions
    • then

      public static ObservationRegistryAssert then(io.micrometer.observation.ObservationRegistry actual)
      Creates the assert object for ObservationRegistry.
      Parameters:
      actual - observation registry to assert against
      Returns:
      meter registry assertions
    • doesNotHaveAnyRemainingCurrentObservation

      public SELF doesNotHaveAnyRemainingCurrentObservation()
      Verifies that there's no current Observation left in the ObservationRegistry.
      Returns:
      this
      Throws:
      AssertionError - if there is a current observation remaining in the registry
    • hasRemainingCurrentObservation

      public SELF hasRemainingCurrentObservation()
      Verifies that there's a current Observation left in the ObservationRegistry.
      Returns:
      this
      Throws:
      AssertionError - if there is no current observation remaining in the registry
    • doesNotHaveRemainingCurrentObservationSameAs

      public SELF doesNotHaveRemainingCurrentObservationSameAs(io.micrometer.observation.Observation observation)
      Verifies that there's no current Observation left in the ObservationRegistry.
      Parameters:
      observation - to compare against
      Returns:
      this
      Throws:
      AssertionError - if there is a current observation remaining in the registry
    • hasRemainingCurrentObservationSameAs

      public SELF hasRemainingCurrentObservationSameAs(io.micrometer.observation.Observation observation)
      Verifies that there's a current Observation left in the ObservationRegistry.
      Parameters:
      observation - to compare against
      Returns:
      this
      Throws:
      AssertionError - if there is no current observation remaining in the registry
    • doesNotHaveAnyRemainingCurrentScope

      public SELF doesNotHaveAnyRemainingCurrentScope()
      Verifies that there's no current Observation.Scope left in the ObservationRegistry.
      Returns:
      this
      Throws:
      AssertionError - if there is a current scope remaining in the registry
    • hasRemainingCurrentScope

      public SELF hasRemainingCurrentScope()
      Verifies that there's a current Observation.Scope left in the ObservationRegistry.
      Returns:
      this
      Throws:
      AssertionError - if there is no current scope remaining in the registry
    • doesNotHaveRemainingCurrentScopeSameAs

      public SELF doesNotHaveRemainingCurrentScopeSameAs(io.micrometer.observation.Observation.Scope scope)
      Verifies that the current Observation.Scope in the ObservationRegistry is not the same as the provided scope. This assertion also passes if there is no current scope in the registry.
      Returns:
      this
      Throws:
      AssertionError - if there is a current scope remaining in the registry and it is the same as the provided scope
    • hasRemainingCurrentScopeSameAs

      public SELF hasRemainingCurrentScopeSameAs(io.micrometer.observation.Observation.Scope scope)
      Verifies that the current Observation.Scope in the ObservationRegistry is the same instance as the provided scope.
      Returns:
      this
      Throws:
      AssertionError - if the provided scope is not the current scope remaining in the registry