Class MetricAssert

java.lang.Object
org.assertj.core.api.AbstractAssert<MetricAssert,io.opentelemetry.sdk.metrics.data.MetricData>
io.opentelemetry.sdk.testing.assertj.MetricAssert
All Implemented Interfaces:
org.assertj.core.api.Assert<MetricAssert,io.opentelemetry.sdk.metrics.data.MetricData>, org.assertj.core.api.Descriptable<MetricAssert>, org.assertj.core.api.ExtensionPoints<MetricAssert,io.opentelemetry.sdk.metrics.data.MetricData>

public final class MetricAssert extends org.assertj.core.api.AbstractAssert<MetricAssert,io.opentelemetry.sdk.metrics.data.MetricData>
Assertions for an exported MetricData.
Since:
1.14.0
  • Field Summary

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

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

    Modifier and Type
    Method
    Description
    hasDescription(String description)
    Asserts the metric has the given description.
    Asserts this MetricData is a DoubleGauge that satisfies the provided assertion.
    Asserts this MetricData is a double sum that satisfies the provided assertion.
    Asserts this MetricData is an exponential histogram that satisfies the provided assertion.
    Asserts this MetricData is a histogram that satisfies the provided assertion.
    hasInstrumentationScope(io.opentelemetry.sdk.common.InstrumentationScopeInfo instrumentationScopeInfo)
    Asserts the metric has the given the InstrumentationScopeInfo.
    Asserts this MetricData is a LongGauge that satisfies the provided assertion.
    Asserts this MetricData is a long sum that satisfies the provided assertion.
    Asserts the metric has the given name.
    hasResource(io.opentelemetry.sdk.resources.Resource resource)
    Asserts the metric has the given Resource.
    Asserts the metric has a resource satisfying the given condition.
    Asserts this MetricData is a summary that satisfies the provided assertion.
    Asserts the metric has the given unit.

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

    areEqual, asInstanceOf, asList, assertionError, asString, describedAs, descriptionText, doesNotHave, doesNotHaveSameClassAs, doesNotHaveSameHashCodeAs, doesNotHaveToString, doesNotHaveToString, 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, 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, describedAs
  • Method Details

    • hasResource

      public MetricAssert hasResource(io.opentelemetry.sdk.resources.Resource resource)
      Asserts the metric has the given Resource.
    • hasResourceSatisfying

      public MetricAssert hasResourceSatisfying(Consumer<ResourceAssert> resource)
      Asserts the metric has a resource satisfying the given condition.
      Since:
      1.23.0
    • hasInstrumentationScope

      public MetricAssert hasInstrumentationScope(io.opentelemetry.sdk.common.InstrumentationScopeInfo instrumentationScopeInfo)
      Asserts the metric has the given the InstrumentationScopeInfo.
    • hasName

      public MetricAssert hasName(String name)
      Asserts the metric has the given name.
    • hasDescription

      public MetricAssert hasDescription(String description)
      Asserts the metric has the given description.
    • hasUnit

      public MetricAssert hasUnit(String unit)
      Asserts the metric has the given unit.
    • hasDoubleGaugeSatisfying

      public MetricAssert hasDoubleGaugeSatisfying(Consumer<DoubleGaugeAssert> assertion)
      Asserts this MetricData is a DoubleGauge that satisfies the provided assertion.
    • hasLongGaugeSatisfying

      public MetricAssert hasLongGaugeSatisfying(Consumer<LongGaugeAssert> assertion)
      Asserts this MetricData is a LongGauge that satisfies the provided assertion.
    • hasDoubleSumSatisfying

      public MetricAssert hasDoubleSumSatisfying(Consumer<DoubleSumAssert> assertion)
      Asserts this MetricData is a double sum that satisfies the provided assertion.
    • hasLongSumSatisfying

      public MetricAssert hasLongSumSatisfying(Consumer<LongSumAssert> assertion)
      Asserts this MetricData is a long sum that satisfies the provided assertion.
    • hasHistogramSatisfying

      public MetricAssert hasHistogramSatisfying(Consumer<HistogramAssert> assertion)
      Asserts this MetricData is a histogram that satisfies the provided assertion.
    • hasExponentialHistogramSatisfying

      public MetricAssert hasExponentialHistogramSatisfying(Consumer<ExponentialHistogramAssert> assertion)
      Asserts this MetricData is an exponential histogram that satisfies the provided assertion.
      Since:
      1.23.0
    • hasSummarySatisfying

      public MetricAssert hasSummarySatisfying(Consumer<SummaryAssert> assertion)
      Asserts this MetricData is a summary that satisfies the provided assertion.