Class AttributesAssert
java.lang.Object
org.assertj.core.api.AbstractAssert<AttributesAssert,io.opentelemetry.api.common.Attributes>
io.opentelemetry.sdk.testing.assertj.AttributesAssert
- All Implemented Interfaces:
org.assertj.core.api.Assert<AttributesAssert,
,io.opentelemetry.api.common.Attributes> org.assertj.core.api.Descriptable<AttributesAssert>
,org.assertj.core.api.ExtensionPoints<AttributesAssert,
io.opentelemetry.api.common.Attributes>
public final class AttributesAssert
extends org.assertj.core.api.AbstractAssert<AttributesAssert,io.opentelemetry.api.common.Attributes>
Assertions for
Attributes
.-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals
-
Method Summary
Modifier and TypeMethodDescriptioncontainsEntry
(io.opentelemetry.api.common.AttributeKey<Long> key, int value) Asserts the attributes have the given key and value.<T> AttributesAssert
containsEntry
(io.opentelemetry.api.common.AttributeKey<T> key, T value) Asserts the attributes have the given key and value.containsEntry
(String key, boolean value) Asserts the attributes have the given key and boolean value.containsEntry
(String key, double value) Asserts the attributes have the given key and double value.containsEntry
(String key, long value) Asserts the attributes have the given key and long value.containsEntry
(String key, Boolean... value) Asserts the attributes have the given key and boolean array value.containsEntry
(String key, Double... value) Asserts the attributes have the given key and double array value.containsEntry
(String key, Long... value) Asserts the attributes have the given key and long array value.containsEntry
(String key, String value) Asserts the attributes have the given key and string value.containsEntry
(String key, String... value) Asserts the attributes have the given key and string array value.containsEntryWithBooleanValuesOf
(String key, Iterable<Boolean> value) Asserts the attributes have the given key and boolean array value.containsEntryWithDoubleValuesOf
(String key, Iterable<Double> value) Asserts the attributes have the given key and double array value.containsEntryWithLongValuesOf
(String key, Iterable<Long> value) Asserts the attributes have the given key and long array value.containsEntryWithStringValuesOf
(String key, Iterable<String> value) Asserts the attributes have the given key and string array value.containsKey
(io.opentelemetry.api.common.AttributeKey<?> key) Asserts the attributes contain the given key.containsKey
(String key) Asserts the attributes contain the given key.final AttributesAssert
containsOnly
(Map.Entry<? extends io.opentelemetry.api.common.AttributeKey<?>, ?>... entries) Asserts the attributes only contain the given entries.doesNotContainKey
(io.opentelemetry.api.common.AttributeKey<?> key) Asserts the attributes do not contain the given key.doesNotContainKey
(String key) Asserts the attributes do not contain the given key.<T> AttributesAssert
hasEntrySatisfying
(io.opentelemetry.api.common.AttributeKey<T> key, Consumer<T> valueCondition) Asserts the attributes have the given key with a value satisfying the given condition.hasSize
(int numberOfEntries) Asserts the number of attributes in the collection.isEmpty()
Asserts the attributes have no entries.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
-
containsEntry
Asserts the attributes have the given key and value. -
containsEntry
public AttributesAssert containsEntry(io.opentelemetry.api.common.AttributeKey<Long> key, int value) Asserts the attributes have the given key and value. -
containsEntry
Asserts the attributes have the given key and string value. -
containsEntry
Asserts the attributes have the given key and boolean value. -
containsEntry
Asserts the attributes have the given key and long value. -
containsEntry
Asserts the attributes have the given key and double value. -
containsEntry
Asserts the attributes have the given key and string array value. -
containsEntry
Asserts the attributes have the given key and boolean array value. -
containsEntry
Asserts the attributes have the given key and long array value. -
containsEntry
Asserts the attributes have the given key and double array value. -
containsEntryWithStringValuesOf
Asserts the attributes have the given key and string array value. -
containsEntryWithBooleanValuesOf
Asserts the attributes have the given key and boolean array value. -
containsEntryWithLongValuesOf
Asserts the attributes have the given key and long array value. -
containsEntryWithDoubleValuesOf
Asserts the attributes have the given key and double array value. -
hasEntrySatisfying
public <T> AttributesAssert hasEntrySatisfying(io.opentelemetry.api.common.AttributeKey<T> key, Consumer<T> valueCondition) Asserts the attributes have the given key with a value satisfying the given condition. -
containsOnly
@SafeVarargs public final AttributesAssert containsOnly(Map.Entry<? extends io.opentelemetry.api.common.AttributeKey<?>, ?>... entries) Asserts the attributes only contain the given entries. -
containsKey
Asserts the attributes contain the given key. -
containsKey
Asserts the attributes contain the given key. -
doesNotContainKey
Asserts the attributes do not contain the given key.- Since:
- 1.18.0
-
doesNotContainKey
Asserts the attributes do not contain the given key.- Since:
- 1.18.0
-
isEmpty
Asserts the attributes have no entries. -
hasSize
Asserts the number of attributes in the collection.
-