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 TypeMethodDescriptionhasDescription(String description) Asserts the metric has the given description.hasDoubleGaugeSatisfying(Consumer<DoubleGaugeAssert> assertion) Asserts thisMetricDatais aDoubleGaugethat satisfies the provided assertion.hasDoubleSumSatisfying(Consumer<DoubleSumAssert> assertion) Asserts thisMetricDatais a double sum that satisfies the provided assertion.hasHistogramSatisfying(Consumer<HistogramAssert> assertion) Asserts thisMetricDatais a histogram that satisfies the provided assertion.hasInstrumentationScope(io.opentelemetry.sdk.common.InstrumentationScopeInfo instrumentationScopeInfo) Asserts the metric has the given theInstrumentationScopeInfo.hasLongGaugeSatisfying(Consumer<LongGaugeAssert> assertion) Asserts thisMetricDatais aLongGaugethat satisfies the provided assertion.hasLongSumSatisfying(Consumer<LongSumAssert> assertion) Asserts thisMetricDatais 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 givenResource.hasSummarySatisfying(Consumer<SummaryAssert> assertion) Asserts thisMetricDatais 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, 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
-
Method Details
-
hasResource
Asserts the metric has the givenResource. -
hasInstrumentationScope
public MetricAssert hasInstrumentationScope(io.opentelemetry.sdk.common.InstrumentationScopeInfo instrumentationScopeInfo) Asserts the metric has the given theInstrumentationScopeInfo. -
hasName
Asserts the metric has the given name. -
hasDescription
Asserts the metric has the given description. -
hasUnit
Asserts the metric has the given unit. -
hasDoubleGaugeSatisfying
Asserts thisMetricDatais aDoubleGaugethat satisfies the provided assertion. -
hasLongGaugeSatisfying
Asserts thisMetricDatais aLongGaugethat satisfies the provided assertion. -
hasDoubleSumSatisfying
Asserts thisMetricDatais a double sum that satisfies the provided assertion. -
hasLongSumSatisfying
Asserts thisMetricDatais a long sum that satisfies the provided assertion. -
hasHistogramSatisfying
Asserts thisMetricDatais a histogram that satisfies the provided assertion. -
hasSummarySatisfying
Asserts thisMetricDatais a summary that satisfies the provided assertion.
-