Class OpenTelemetryAssertions
java.lang.Object
org.assertj.core.api.Assertions
io.opentelemetry.sdk.testing.assertj.OpenTelemetryAssertions
- All Implemented Interfaces:
org.assertj.core.api.InstanceOfAssertFactories
public final class OpenTelemetryAssertions
extends org.assertj.core.api.Assertions
Entry point for assertion methods for OpenTelemetry types. To use type-specific assertions,
static import any
assertThat
method in this class instead of
Assertions.assertThat
.-
Field Summary
Fields inherited from interface org.assertj.core.api.InstanceOfAssertFactories
ARRAY, ARRAY_2D, ATOMIC_BOOLEAN, ATOMIC_INTEGER, ATOMIC_INTEGER_ARRAY, ATOMIC_INTEGER_FIELD_UPDATER, ATOMIC_LONG, ATOMIC_LONG_ARRAY, ATOMIC_LONG_FIELD_UPDATER, ATOMIC_MARKABLE_REFERENCE, ATOMIC_REFERENCE, ATOMIC_REFERENCE_ARRAY, ATOMIC_REFERENCE_FIELD_UPDATER, ATOMIC_STAMPED_REFERENCE, BIG_DECIMAL, BIG_INTEGER, BOOLEAN, BOOLEAN_2D_ARRAY, BOOLEAN_ARRAY, BYTE, BYTE_2D_ARRAY, BYTE_ARRAY, CHAR_2D_ARRAY, CHAR_ARRAY, CHAR_SEQUENCE, CHARACTER, CLASS, COLLECTION, COMPLETABLE_FUTURE, COMPLETION_STAGE, DATE, DOUBLE, DOUBLE_2D_ARRAY, DOUBLE_ARRAY, DOUBLE_PREDICATE, DOUBLE_STREAM, DURATION, FILE, FLOAT, FLOAT_2D_ARRAY, FLOAT_ARRAY, FUTURE, INPUT_STREAM, INSTANT, INT_2D_ARRAY, INT_ARRAY, INT_PREDICATE, INT_STREAM, INTEGER, ITERABLE, ITERATOR, LIST, LOCAL_DATE, LOCAL_DATE_TIME, LOCAL_TIME, LONG, LONG_2D_ARRAY, LONG_ADDER, LONG_ARRAY, LONG_PREDICATE, LONG_STREAM, MAP, OFFSET_DATE_TIME, OFFSET_TIME, OPTIONAL, OPTIONAL_DOUBLE, OPTIONAL_INT, OPTIONAL_LONG, PATH, PERIOD, PREDICATE, SHORT, SHORT_2D_ARRAY, SHORT_ARRAY, SPLITERATOR, STREAM, STRING, STRING_BUFFER, STRING_BUILDER, THROWABLE, URI_TYPE, URL_TYPE, ZONED_DATE_TIME
-
Method Summary
Modifier and TypeMethodDescriptionstatic AttributesAssert
assertThat
(io.opentelemetry.api.common.Attributes attributes) Returns an assertion forAttributes
.static EventDataAssert
assertThat
(io.opentelemetry.sdk.trace.data.EventData eventData) Returns an assertion forEventDataAssert
.static SpanDataAssert
assertThat
(io.opentelemetry.sdk.trace.data.SpanData spanData) Returns an assertion forSpanDataAssert
.attributeEntry
(String key, boolean value) Returns an attribute entry with a boolean value for use withAttributesAssert.containsOnly(java.util.Map.Entry[])
.attributeEntry
(String key, boolean... value) Returns an attribute entry with a boolean array value for use withAttributesAssert.containsOnly(java.util.Map.Entry[])
.attributeEntry
(String key, double value) Returns an attribute entry with a double value for use withAttributesAssert.containsOnly(java.util.Map.Entry[])
.attributeEntry
(String key, double... value) Returns an attribute entry with a double array value for use withAttributesAssert.containsOnly(java.util.Map.Entry[])
.attributeEntry
(String key, long value) Returns an attribute entry with a long value for use withAttributesAssert.containsOnly(java.util.Map.Entry[])
.attributeEntry
(String key, long... value) Returns an attribute entry with a long array value for use withAttributesAssert.containsOnly(java.util.Map.Entry[])
.attributeEntry
(String key, String value) Returns an attribute entry with a String value for use withAttributesAssert.containsOnly(java.util.Map.Entry[])
.attributeEntry
(String key, String... value) Returns an attribute entry with a String array value for use withAttributesAssert.containsOnly(java.util.Map.Entry[])
.Methods inherited from class org.assertj.core.api.Assertions
allOf, allOf, anyOf, anyOf, as, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThatCode, assertThatExceptionOfType, assertThatIllegalArgumentException, assertThatIllegalStateException, assertThatIOException, assertThatNoException, assertThatNullPointerException, assertThatObject, assertThatThrownBy, assertThatThrownBy, assertWith, atIndex, byLessThan, byLessThan, byLessThan, byLessThan, byLessThan, byLessThan, byLessThan, byLessThan, byLessThan, catchThrowable, catchThrowableOfType, contentOf, contentOf, contentOf, contentOf, contentOf, contentOf, doesNotHave, entry, extractProperty, extractProperty, fail, fail, fail, failBecauseExceptionWasNotThrown, filter, filter, from, in, linesOf, linesOf, linesOf, linesOf, linesOf, linesOf, not, not, notIn, offset, offset, registerCustomDateFormat, registerCustomDateFormat, registerFormatterForType, setAllowComparingPrivateFields, setAllowExtractingPrivateFields, setDescriptionConsumer, setExtractBareNamePropertyMethods, setLenientDateParsing, setMaxElementsForPrinting, setMaxLengthForSingleLineDescription, setMaxStackTraceElementsDisplayed, setPrintAssertionsDescription, setRemoveAssertJRelatedElementsFromStackTrace, shouldHaveThrown, tuple, useDefaultDateFormatsOnly, useDefaultRepresentation, useRepresentation, within, within, within, within, within, within, within, within, within, withinPercentage, withinPercentage, withinPercentage, withMarginOf, withPrecision, withPrecision
-
Method Details
-
assertThat
Returns an assertion forAttributes
. -
assertThat
Returns an assertion forSpanDataAssert
. -
assertThat
Returns an assertion forEventDataAssert
. -
attributeEntry
public static Map.Entry<io.opentelemetry.api.common.AttributeKey<String>,String> attributeEntry(String key, String value) Returns an attribute entry with a String value for use withAttributesAssert.containsOnly(java.util.Map.Entry[])
. -
attributeEntry
public static Map.Entry<io.opentelemetry.api.common.AttributeKey<Boolean>,Boolean> attributeEntry(String key, boolean value) Returns an attribute entry with a boolean value for use withAttributesAssert.containsOnly(java.util.Map.Entry[])
. -
attributeEntry
public static Map.Entry<io.opentelemetry.api.common.AttributeKey<Long>,Long> attributeEntry(String key, long value) Returns an attribute entry with a long value for use withAttributesAssert.containsOnly(java.util.Map.Entry[])
. -
attributeEntry
public static Map.Entry<io.opentelemetry.api.common.AttributeKey<Double>,Double> attributeEntry(String key, double value) Returns an attribute entry with a double value for use withAttributesAssert.containsOnly(java.util.Map.Entry[])
. -
attributeEntry
public static Map.Entry<io.opentelemetry.api.common.AttributeKey<List<String>>,List<String>> attributeEntry(String key, String... value) Returns an attribute entry with a String array value for use withAttributesAssert.containsOnly(java.util.Map.Entry[])
. -
attributeEntry
public static Map.Entry<io.opentelemetry.api.common.AttributeKey<List<Boolean>>,List<Boolean>> attributeEntry(String key, boolean... value) Returns an attribute entry with a boolean array value for use withAttributesAssert.containsOnly(java.util.Map.Entry[])
. -
attributeEntry
public static Map.Entry<io.opentelemetry.api.common.AttributeKey<List<Long>>,List<Long>> attributeEntry(String key, long... value) Returns an attribute entry with a long array value for use withAttributesAssert.containsOnly(java.util.Map.Entry[])
. -
attributeEntry
public static Map.Entry<io.opentelemetry.api.common.AttributeKey<List<Double>>,List<Double>> attributeEntry(String key, double... value) Returns an attribute entry with a double array value for use withAttributesAssert.containsOnly(java.util.Map.Entry[])
.
-