Class 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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      <T> AttributesAssert containsEntry​(io.opentelemetry.api.common.AttributeKey<T> key, T value)
      Asserts the attributes have the given key and value.
      AttributesAssert containsEntry​(java.lang.String key, boolean value)
      Asserts the attributes have the given key and boolean value.
      AttributesAssert containsEntry​(java.lang.String key, double value)
      Asserts the attributes have the given key and double value.
      AttributesAssert containsEntry​(java.lang.String key, long value)
      Asserts the attributes have the given key and long value.
      AttributesAssert containsEntry​(java.lang.String key, java.lang.Boolean... value)
      Asserts the attributes have the given key and boolean array value.
      AttributesAssert containsEntry​(java.lang.String key, java.lang.Double... value)
      Asserts the attributes have the given key and double array value.
      AttributesAssert containsEntry​(java.lang.String key, java.lang.Long... value)
      Asserts the attributes have the given key and long array value.
      AttributesAssert containsEntry​(java.lang.String key, java.lang.String value)
      Asserts the attributes have the given key and string value.
      AttributesAssert containsEntry​(java.lang.String key, java.lang.String... value)
      Asserts the attributes have the given key and string array value.
      AttributesAssert containsEntryWithBooleanValuesOf​(java.lang.String key, java.lang.Iterable<java.lang.Boolean> value)
      Asserts the attributes have the given key and boolean array value.
      AttributesAssert containsEntryWithDoubleValuesOf​(java.lang.String key, java.lang.Iterable<java.lang.Double> value)
      Asserts the attributes have the given key and double array value.
      AttributesAssert containsEntryWithLongValuesOf​(java.lang.String key, java.lang.Iterable<java.lang.Long> value)
      Asserts the attributes have the given key and long array value.
      AttributesAssert containsEntryWithStringValuesOf​(java.lang.String key, java.lang.Iterable<java.lang.String> value)
      Asserts the attributes have the given key and string array value.
      AttributesAssert containsOnly​(java.util.Map.Entry<? extends io.opentelemetry.api.common.AttributeKey<?>,​?>... entries)
      Asserts the attributes only contain the given entries.
      <T> AttributesAssert hasEntrySatisfying​(io.opentelemetry.api.common.AttributeKey<T> key, java.util.function.Consumer<T> valueCondition)
      Asserts the attributes have the given key with a value satisfying the given condition.
      AttributesAssert hasSize​(int numberOfEntries)
      Asserts the number of attributes in the collection.
      AttributesAssert isEmpty()
      Asserts the attributes have no entries.
      • 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, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOf, 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
    • Method Detail

      • containsEntry

        public <T> AttributesAssert containsEntry​(io.opentelemetry.api.common.AttributeKey<T> key,
                                                  T value)
        Asserts the attributes have the given key and value.
      • containsEntry

        public AttributesAssert containsEntry​(java.lang.String key,
                                              java.lang.String value)
        Asserts the attributes have the given key and string value.
      • containsEntry

        public AttributesAssert containsEntry​(java.lang.String key,
                                              boolean value)
        Asserts the attributes have the given key and boolean value.
      • containsEntry

        public AttributesAssert containsEntry​(java.lang.String key,
                                              long value)
        Asserts the attributes have the given key and long value.
      • containsEntry

        public AttributesAssert containsEntry​(java.lang.String key,
                                              double value)
        Asserts the attributes have the given key and double value.
      • containsEntry

        public AttributesAssert containsEntry​(java.lang.String key,
                                              java.lang.String... value)
        Asserts the attributes have the given key and string array value.
      • containsEntry

        public AttributesAssert containsEntry​(java.lang.String key,
                                              java.lang.Boolean... value)
        Asserts the attributes have the given key and boolean array value.
      • containsEntry

        public AttributesAssert containsEntry​(java.lang.String key,
                                              java.lang.Long... value)
        Asserts the attributes have the given key and long array value.
      • containsEntry

        public AttributesAssert containsEntry​(java.lang.String key,
                                              java.lang.Double... value)
        Asserts the attributes have the given key and double array value.
      • containsEntryWithStringValuesOf

        public AttributesAssert containsEntryWithStringValuesOf​(java.lang.String key,
                                                                java.lang.Iterable<java.lang.String> value)
        Asserts the attributes have the given key and string array value.
      • containsEntryWithBooleanValuesOf

        public AttributesAssert containsEntryWithBooleanValuesOf​(java.lang.String key,
                                                                 java.lang.Iterable<java.lang.Boolean> value)
        Asserts the attributes have the given key and boolean array value.
      • containsEntryWithLongValuesOf

        public AttributesAssert containsEntryWithLongValuesOf​(java.lang.String key,
                                                              java.lang.Iterable<java.lang.Long> value)
        Asserts the attributes have the given key and long array value.
      • containsEntryWithDoubleValuesOf

        public AttributesAssert containsEntryWithDoubleValuesOf​(java.lang.String key,
                                                                java.lang.Iterable<java.lang.Double> value)
        Asserts the attributes have the given key and double array value.
      • hasEntrySatisfying

        public <T> AttributesAssert hasEntrySatisfying​(io.opentelemetry.api.common.AttributeKey<T> key,
                                                       java.util.function.Consumer<T> valueCondition)
        Asserts the attributes have the given key with a value satisfying the given condition.
      • containsOnly

        @SafeVarargs
        public final AttributesAssert containsOnly​(java.util.Map.Entry<? extends io.opentelemetry.api.common.AttributeKey<?>,​?>... entries)
        Asserts the attributes only contain the given entries.
      • isEmpty

        public AttributesAssert isEmpty()
        Asserts the attributes have no entries.
      • hasSize

        public AttributesAssert hasSize​(int numberOfEntries)
        Asserts the number of attributes in the collection.