Class TraceAssert

  • All Implemented Interfaces:
    org.assertj.core.api.Assert<TraceAssert,​List<io.opentelemetry.sdk.trace.data.SpanData>>, org.assertj.core.api.Descriptable<TraceAssert>, org.assertj.core.api.EnumerableAssert<TraceAssert,​io.opentelemetry.sdk.trace.data.SpanData>, org.assertj.core.api.ExtensionPoints<TraceAssert,​List<io.opentelemetry.sdk.trace.data.SpanData>>, org.assertj.core.api.ObjectEnumerableAssert<TraceAssert,​io.opentelemetry.sdk.trace.data.SpanData>

    public class TraceAssert
    extends org.assertj.core.api.AbstractIterableAssert<TraceAssert,​List<io.opentelemetry.sdk.trace.data.SpanData>,​io.opentelemetry.sdk.trace.data.SpanData,​SpanDataAssert>
    Assertions for an exported trace, a list of SpanData with the same trace ID.
    • Field Summary

      • Fields inherited from class org.assertj.core.api.AbstractIterableAssert

        iterables
      • 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
      TraceAssert hasSpansSatisfyingExactly​(Consumer<SpanDataAssert>... assertions)
      Asserts that the trace under assertion has the same number of spans as provided assertions and executes each SpanDataAssert in assertions in order with the corresponding span.
      TraceAssert hasTraceId​(String traceId)
      Asserts that the trace has the given trace ID.
      protected TraceAssert newAbstractIterableAssert​(Iterable<? extends io.opentelemetry.sdk.trace.data.SpanData> iterable)  
      protected SpanDataAssert toAssert​(io.opentelemetry.sdk.trace.data.SpanData value, String description)  
      • Methods inherited from class org.assertj.core.api.AbstractIterableAssert

        allMatch, allMatch, allSatisfy, anyMatch, anySatisfy, are, areAtLeast, areAtLeastOne, areAtMost, areExactly, areNot, as, as, contains, containsAll, containsAnyElementsOf, containsAnyOf, containsExactly, containsExactlyElementsOf, containsExactlyInAnyOrder, containsExactlyInAnyOrderElementsOf, containsNull, containsOnly, containsOnlyElementsOf, containsOnlyNulls, containsOnlyOnce, containsOnlyOnceElementsOf, containsSequence, containsSequence, containsSubsequence, containsSubsequence, describedAs, describedAs, doesNotContain, doesNotContainAnyElementsOf, doesNotContainNull, doesNotContainSequence, doesNotContainSequence, doesNotContainSubsequence, doesNotContainSubsequence, doesNotHave, doesNotHaveAnyElementsOfTypes, doesNotHaveDuplicates, doesNotHaveSameClassAs, doNotHave, element, element, endsWith, endsWith, extracting, extracting, extracting, extracting, extracting, extracting, extractingResultOf, extractingResultOf, filteredOn, filteredOn, filteredOn, filteredOn, filteredOn, filteredOnAssertions, filteredOnNull, first, first, flatExtracting, flatExtracting, flatExtracting, flatExtracting, flatExtracting, flatExtracting, flatMap, flatMap, flatMap, flatMap, getComparatorsByType, getComparatorsForElementPropertyOrFieldTypes, has, hasAtLeastOneElementOfType, hasOnlyElementsOfType, hasOnlyElementsOfTypes, hasOnlyOneElementSatisfying, hasSameClassAs, hasSameElementsAs, hasSameSizeAs, hasSameSizeAs, hasSize, hasSizeBetween, hasSizeGreaterThan, hasSizeGreaterThanOrEqualTo, hasSizeLessThan, hasSizeLessThanOrEqualTo, hasToString, have, haveAtLeast, haveAtLeastOne, haveAtMost, haveExactly, inBinary, inHexadecimal, is, isEmpty, isEqualTo, isExactlyInstanceOf, isIn, isIn, isInstanceOf, isInstanceOfAny, isNot, isNotEmpty, isNotEqualTo, isNotExactlyInstanceOf, isNotIn, isNotIn, isNotInstanceOf, isNotInstanceOfAny, isNotNull, isNotOfAnyClassIn, isNotSameAs, isNullOrEmpty, isOfAnyClassIn, isSameAs, isSubsetOf, isSubsetOf, last, last, map, map, map, navigationDescription, noneMatch, noneSatisfy, overridingErrorMessage, singleElement, singleElement, size, startsWith, usingComparator, usingComparator, usingComparatorForElementFieldsWithNames, usingComparatorForElementFieldsWithType, usingComparatorForType, usingComparisonStrategy, usingDefaultComparator, usingDefaultElementComparator, usingElementComparator, usingElementComparatorIgnoringFields, usingElementComparatorOnFields, usingFieldByFieldElementComparator, usingRecursiveComparison, usingRecursiveComparison, usingRecursiveFieldByFieldElementComparator, usingRecursiveFieldByFieldElementComparator, withFailMessage, withThreadDumpOnError, zipSatisfy
      • Methods inherited from class org.assertj.core.api.AbstractAssert

        asInstanceOf, asList, assertionError, asString, descriptionText, equals, extracting, extracting, failure, failureWithActualExpected, failWithActualExpectedAndMessage, failWithMessage, getWritableAssertionInfo, hashCode, hasSameHashCodeAs, isElementOfCustomAssert, isInstanceOfSatisfying, isNull, matches, matches, newListAssertInstance, overridingErrorMessage, satisfies, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOf, setCustomRepresentation, setDescriptionConsumer, setPrintAssertionsDescription, throwAssertionError, withFailMessage, withRepresentation
    • Method Detail

      • hasTraceId

        public TraceAssert hasTraceId​(String traceId)
        Asserts that the trace has the given trace ID.
      • hasSpansSatisfyingExactly

        @SafeVarargs
        public final TraceAssert hasSpansSatisfyingExactly​(Consumer<SpanDataAssert>... assertions)
        Asserts that the trace under assertion has the same number of spans as provided assertions and executes each SpanDataAssert in assertions in order with the corresponding span.
      • toAssert

        protected SpanDataAssert toAssert​(io.opentelemetry.sdk.trace.data.SpanData value,
                                          String description)
        Specified by:
        toAssert in class org.assertj.core.api.AbstractIterableAssert<TraceAssert,​List<io.opentelemetry.sdk.trace.data.SpanData>,​io.opentelemetry.sdk.trace.data.SpanData,​SpanDataAssert>
      • newAbstractIterableAssert

        protected TraceAssert newAbstractIterableAssert​(Iterable<? extends io.opentelemetry.sdk.trace.data.SpanData> iterable)
        Specified by:
        newAbstractIterableAssert in class org.assertj.core.api.AbstractIterableAssert<TraceAssert,​List<io.opentelemetry.sdk.trace.data.SpanData>,​io.opentelemetry.sdk.trace.data.SpanData,​SpanDataAssert>