Class ResourceAssert
java.lang.Object
org.assertj.core.api.AbstractAssert<ResourceAssert,io.opentelemetry.sdk.resources.Resource>
io.opentelemetry.sdk.testing.assertj.ResourceAssert
- All Implemented Interfaces:
org.assertj.core.api.Assert<ResourceAssert,,io.opentelemetry.sdk.resources.Resource> org.assertj.core.api.Descriptable<ResourceAssert>,org.assertj.core.api.ExtensionPoints<ResourceAssert,io.opentelemetry.sdk.resources.Resource>
public final class ResourceAssert
extends org.assertj.core.api.AbstractAssert<ResourceAssert,io.opentelemetry.sdk.resources.Resource>
Assertions for
Resource.- Since:
- 1.23.0
-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals -
Method Summary
Modifier and TypeMethodDescription<T> ResourceAsserthasAttribute(io.opentelemetry.api.common.AttributeKey<T> key, T value) Asserts the resource has the given attribute.hasAttribute(AttributeAssertion attributeAssertion) Asserts the resource has an attribute matching theattributeAssertion.hasAttributes(io.opentelemetry.api.common.Attributes attributes) Asserts the resource has the given attributes.final ResourceAsserthasAttributes(Map.Entry<? extends io.opentelemetry.api.common.AttributeKey<?>, ?>... entries) Asserts the resource has the given attributes.hasAttributesSatisfying(AttributeAssertion... assertions) Asserts the event has attributes matching allassertions.hasAttributesSatisfying(Iterable<AttributeAssertion> assertions) Asserts the event has attributes matching allassertions.hasAttributesSatisfying(Consumer<io.opentelemetry.api.common.Attributes> attributes) Asserts the resource has attributes satisfying the given condition.hasAttributesSatisfyingExactly(AttributeAssertion... assertions) Asserts the resource has attributes matching allassertionsand no more.hasAttributesSatisfyingExactly(Iterable<AttributeAssertion> assertions) Asserts the resource has attributes matching allassertionsand no more.hasSchemaUrl(String schemaUrl) Asserts the resource has a schemaUrl satisfying the given condition.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, usingRecursiveAssertion, usingRecursiveAssertion, 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
-
hasSchemaUrl
Asserts the resource has a schemaUrl satisfying the given condition. -
hasAttribute
Asserts the resource has the given attribute. -
hasAttribute
Asserts the resource has an attribute matching theattributeAssertion. -
hasAttributes
Asserts the resource has the given attributes. -
hasAttributes
@SafeVarargs public final ResourceAssert hasAttributes(Map.Entry<? extends io.opentelemetry.api.common.AttributeKey<?>, ?>... entries) Asserts the resource has the given attributes. -
hasAttributesSatisfying
public ResourceAssert hasAttributesSatisfying(Consumer<io.opentelemetry.api.common.Attributes> attributes) Asserts the resource has attributes satisfying the given condition. -
hasAttributesSatisfying
Asserts the event has attributes matching allassertions. Assertions can be created using methods likeOpenTelemetryAssertions.satisfies(AttributeKey, OpenTelemetryAssertions.LongAssertConsumer). -
hasAttributesSatisfying
Asserts the event has attributes matching allassertions. Assertions can be created using methods likeOpenTelemetryAssertions.satisfies(AttributeKey, OpenTelemetryAssertions.LongAssertConsumer). -
hasAttributesSatisfyingExactly
Asserts the resource has attributes matching allassertionsand no more. Assertions can be created using methods likeOpenTelemetryAssertions.satisfies(AttributeKey, OpenTelemetryAssertions.LongAssertConsumer). -
hasAttributesSatisfyingExactly
Asserts the resource has attributes matching allassertionsand no more. Assertions can be created using methods likeOpenTelemetryAssertions.satisfies(AttributeKey, OpenTelemetryAssertions.LongAssertConsumer).
-