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
ConstructorsModifierConstructorDescriptionprotectedMetricDataAssert(io.opentelemetry.sdk.metrics.data.MetricData actual) -
Method Summary
Modifier and TypeMethodDescriptionhasDescription(String description) Ensures thedescriptionfield matches the expected value.GaugeAssert<io.opentelemetry.sdk.metrics.data.DoublePointData>Ensures thisMetricDatais aDoubleGauge.Ensures thisMetricDatais aDoubleHistogram.SumDataAssert<io.opentelemetry.sdk.metrics.data.DoublePointData>Ensures thisMetricDatais aDoubleSum.Ensures thisMetricDatais aDoubleSummaryData.Ensures thisMetricDatais aExponentialHistogram.hasInstrumentationScope(io.opentelemetry.sdk.common.InstrumentationScopeInfo instrumentationScopeInfo) Ensures theInstrumentationScopeInfoassociated with a metric matches the expected value.GaugeAssert<io.opentelemetry.sdk.metrics.data.LongPointData>Ensures thisMetricDatais aLongGauge.SumDataAssert<io.opentelemetry.sdk.metrics.data.LongPointData>Ensures thisMetricDatais aLongSum.Ensures thenamefield matches the expected value.hasResource(io.opentelemetry.sdk.resources.Resource resource) Ensures theResourceassociated with a metric matches the expected value.Ensures theunitfield 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, withThreadDumpOnErrorMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods 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
Ensures theResourceassociated with a metric matches the expected value. -
hasInstrumentationScope
public MetricDataAssert hasInstrumentationScope(io.opentelemetry.sdk.common.InstrumentationScopeInfo instrumentationScopeInfo) Ensures theInstrumentationScopeInfoassociated with a metric matches the expected value. -
hasName
Ensures thenamefield matches the expected value. -
hasDescription
Ensures thedescriptionfield matches the expected value. -
hasUnit
Ensures theunitfield matches the expected value. -
hasDoubleHistogram
Ensures thisMetricDatais aDoubleHistogram.- Returns:
- convenience API to assert against the
DoubleHistogram.
-
hasExponentialHistogram
Ensures thisMetricDatais aExponentialHistogram.- Returns:
- convenience API to assert against the
ExponentialHistogram.
-
hasDoubleGauge
Ensures thisMetricDatais aDoubleGauge.- Returns:
- convenience API to assert against the
DoubleGauge.
-
hasDoubleSum
Ensures thisMetricDatais aDoubleSum.- Returns:
- convenience API to assert against the
DoubleSum.
-
hasLongGauge
Ensures thisMetricDatais aLongGauge.- Returns:
- convenience API to assert against the
LongGauge.
-
hasLongSum
Ensures thisMetricDatais aLongSum.- Returns:
- convenience API to assert against the
LongSum.
-
hasDoubleSummary
Ensures thisMetricDatais aDoubleSummaryData.- Returns:
- convenience API to assert against the
DoubleSummaryData.
-