Class MetricDataAssert

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

public class MetricDataAssert extends org.assertj.core.api.AbstractAssert<MetricDataAssert,io.opentelemetry.sdk.metrics.data.MetricData>
Test assertions for MetricData.
  • Field Summary

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

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

    Constructors
    Modifier
    Constructor
    Description
    protected
    MetricDataAssert(io.opentelemetry.sdk.metrics.data.MetricData actual)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    hasDescription(String description)
    Ensures the description field matches the expected value.
    GaugeAssert<io.opentelemetry.sdk.metrics.data.DoublePointData>
    Ensures this MetricData is a DoubleGauge.
    Ensures this MetricData is a DoubleHistogram.
    SumDataAssert<io.opentelemetry.sdk.metrics.data.DoublePointData>
    Ensures this MetricData is a DoubleSum.
    Ensures this MetricData is a DoubleSummaryData.
    Ensures this MetricData is a ExponentialHistogram.
    hasInstrumentationScope(io.opentelemetry.sdk.common.InstrumentationScopeInfo instrumentationScopeInfo)
    Ensures the InstrumentationScopeInfo associated with a metric matches the expected value.
    GaugeAssert<io.opentelemetry.sdk.metrics.data.LongPointData>
    Ensures this MetricData is a LongGauge.
    SumDataAssert<io.opentelemetry.sdk.metrics.data.LongPointData>
    Ensures this MetricData is a LongSum.
    Ensures the name field matches the expected value.
    hasResource(io.opentelemetry.sdk.resources.Resource resource)
    Ensures the Resource associated with a metric matches the expected value.
    Ensures the unit field matches the expected value.

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

    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, 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

    • MetricDataAssert

      protected MetricDataAssert(io.opentelemetry.sdk.metrics.data.MetricData actual)
  • Method Details

    • hasResource

      public MetricDataAssert hasResource(io.opentelemetry.sdk.resources.Resource resource)
      Ensures the Resource associated with a metric matches the expected value.
    • hasInstrumentationScope

      public MetricDataAssert hasInstrumentationScope(io.opentelemetry.sdk.common.InstrumentationScopeInfo instrumentationScopeInfo)
      Ensures the InstrumentationScopeInfo associated with a metric matches the expected value.
    • hasName

      public MetricDataAssert hasName(String name)
      Ensures the name field matches the expected value.
    • hasDescription

      public MetricDataAssert hasDescription(String description)
      Ensures the description field matches the expected value.
    • hasUnit

      public MetricDataAssert hasUnit(String unit)
      Ensures the unit field matches the expected value.
    • hasDoubleHistogram

      public HistogramAssert hasDoubleHistogram()
      Ensures this MetricData is a DoubleHistogram.
      Returns:
      convenience API to assert against the DoubleHistogram.
    • hasExponentialHistogram

      public ExponentialHistogramAssert hasExponentialHistogram()
      Ensures this MetricData is a ExponentialHistogram.
      Returns:
      convenience API to assert against the ExponentialHistogram.
    • hasDoubleGauge

      public GaugeAssert<io.opentelemetry.sdk.metrics.data.DoublePointData> hasDoubleGauge()
      Ensures this MetricData is a DoubleGauge.
      Returns:
      convenience API to assert against the DoubleGauge.
    • hasDoubleSum

      public SumDataAssert<io.opentelemetry.sdk.metrics.data.DoublePointData> hasDoubleSum()
      Ensures this MetricData is a DoubleSum.
      Returns:
      convenience API to assert against the DoubleSum.
    • hasLongGauge

      public GaugeAssert<io.opentelemetry.sdk.metrics.data.LongPointData> hasLongGauge()
      Ensures this MetricData is a LongGauge.
      Returns:
      convenience API to assert against the LongGauge.
    • hasLongSum

      public SumDataAssert<io.opentelemetry.sdk.metrics.data.LongPointData> hasLongSum()
      Ensures this MetricData is a LongSum.
      Returns:
      convenience API to assert against the LongSum.
    • hasDoubleSummary

      public SummaryDataAssert hasDoubleSummary()
      Ensures this MetricData is a DoubleSummaryData.
      Returns:
      convenience API to assert against the DoubleSummaryData.