Class LogRecordDataAssert
java.lang.Object
org.assertj.core.api.AbstractAssert<LogRecordDataAssert,io.opentelemetry.sdk.logs.data.LogRecordData>
io.opentelemetry.sdk.testing.assertj.LogRecordDataAssert
- All Implemented Interfaces:
org.assertj.core.api.Assert<LogRecordDataAssert,
,io.opentelemetry.sdk.logs.data.LogRecordData> org.assertj.core.api.Descriptable<LogRecordDataAssert>
,org.assertj.core.api.ExtensionPoints<LogRecordDataAssert,
io.opentelemetry.sdk.logs.data.LogRecordData>
public final class LogRecordDataAssert
extends org.assertj.core.api.AbstractAssert<LogRecordDataAssert,io.opentelemetry.sdk.logs.data.LogRecordData>
Test assertions for
LogRecordData
.- Since:
- 1.27.0
-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals
-
Method Summary
Modifier and TypeMethodDescriptionhasAttributes
(io.opentelemetry.api.common.Attributes attributes) Asserts the log has the given attributes.final LogRecordDataAssert
hasAttributes
(Map.Entry<? extends io.opentelemetry.api.common.AttributeKey<?>, ?>... entries) Asserts the log has the given attributes.hasAttributesSatisfying
(AttributeAssertion... assertions) Asserts the log has attributes matching allassertions
.hasAttributesSatisfying
(Iterable<AttributeAssertion> assertions) Asserts the log has attributes matching allassertions
.hasAttributesSatisfying
(Consumer<io.opentelemetry.api.common.Attributes> attributes) Asserts the log has attributes satisfying the given condition.hasAttributesSatisfyingExactly
(AttributeAssertion... assertions) Asserts the log has attributes matching allassertions
and no more.hasAttributesSatisfyingExactly
(Iterable<AttributeAssertion> assertions) Asserts the log has attributes matching allassertions
and no more.Asserts the log has the given body.hasInstrumentationScope
(io.opentelemetry.sdk.common.InstrumentationScopeInfo instrumentationScopeInfo) Asserts theInstrumentationScopeInfo
associated with a log matches the expected value.hasObservedTimestamp
(long observedEpochNanos) Asserts the log has the given epochobservedTimestamp
.hasResource
(io.opentelemetry.sdk.resources.Resource resource) Asserts theResource
associated with a log matches the expected value.hasResourceSatisfying
(Consumer<ResourceAssert> resource) Asserts the log has a resource satisfying the given condition.hasSeverity
(io.opentelemetry.api.logs.Severity severity) Asserts the log has the given severity.hasSeverityText
(String severityText) Asserts the log has the given severity text.hasSpanContext
(io.opentelemetry.api.trace.SpanContext spanContext) Asserts the log has the given span context.hasTimestamp
(long timestampEpochNanos) Asserts the log has the given epochtimestamp
.hasTotalAttributeCount
(int totalAttributeCount) Asserts the log has the given total attributes.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
-
hasResource
Asserts theResource
associated with a log matches the expected value. -
hasResourceSatisfying
Asserts the log has a resource satisfying the given condition.- Since:
- 1.29.0
-
hasInstrumentationScope
public LogRecordDataAssert hasInstrumentationScope(io.opentelemetry.sdk.common.InstrumentationScopeInfo instrumentationScopeInfo) Asserts theInstrumentationScopeInfo
associated with a log matches the expected value. -
hasTimestamp
Asserts the log has the given epochtimestamp
. -
hasObservedTimestamp
Asserts the log has the given epochobservedTimestamp
. -
hasSpanContext
Asserts the log has the given span context. -
hasSeverity
Asserts the log has the given severity. -
hasSeverityText
Asserts the log has the given severity text. -
hasBody
Asserts the log has the given body. -
hasAttributes
Asserts the log has the given attributes. -
hasAttributes
@SafeVarargs public final LogRecordDataAssert hasAttributes(Map.Entry<? extends io.opentelemetry.api.common.AttributeKey<?>, ?>... entries) Asserts the log has the given attributes. -
hasAttributesSatisfying
public LogRecordDataAssert hasAttributesSatisfying(Consumer<io.opentelemetry.api.common.Attributes> attributes) Asserts the log has attributes satisfying the given condition. -
hasAttributesSatisfying
Asserts the log has attributes matching allassertions
. Assertions can be created using methods likeOpenTelemetryAssertions.satisfies(AttributeKey, OpenTelemetryAssertions.LongAssertConsumer)
. -
hasAttributesSatisfying
Asserts the log has attributes matching allassertions
. Assertions can be created using methods likeOpenTelemetryAssertions.satisfies(AttributeKey, OpenTelemetryAssertions.LongAssertConsumer)
. -
hasAttributesSatisfyingExactly
Asserts the log has attributes matching allassertions
and no more. Assertions can be created using methods likeOpenTelemetryAssertions.satisfies(AttributeKey, OpenTelemetryAssertions.LongAssertConsumer)
. -
hasAttributesSatisfyingExactly
Asserts the log has attributes matching allassertions
and no more. Assertions can be created using methods likeOpenTelemetryAssertions.satisfies(AttributeKey, OpenTelemetryAssertions.LongAssertConsumer)
. -
hasTotalAttributeCount
Asserts the log has the given total attributes.
-