Class TracerAssert
java.lang.Object
org.assertj.core.api.AbstractAssert<TracerAssert,SimpleTracer>
io.micrometer.tracing.test.simple.TracerAssert
- All Implemented Interfaces:
org.assertj.core.api.Assert<TracerAssert,,SimpleTracer> org.assertj.core.api.Descriptable<TracerAssert>,org.assertj.core.api.ExtensionPoints<TracerAssert,SimpleTracer>
Assertion methods for
SimpleTracers.
To create a new instance of this class, invoke
assertThat(SimpleTracer) or
then(SimpleTracer).
- Since:
- 1.0.0
-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedTracerAssert(SimpleTracer actual) Creates a new instance ofTracerAssert. -
Method Summary
Modifier and TypeMethodDescriptionstatic TracerAssertassertThat(SimpleTracer actual) Creates the assert object forSimpleTracer.lastSpan()Returns assertion options for the last span created bySimpleTracer.onlySpan()Verifies that there was only one span created by aSimpleTracer.org.assertj.core.api.AbstractCollectionAssert<?,Collection<? extends SimpleSpan>, SimpleSpan, org.assertj.core.api.ObjectAssert<SimpleSpan>> Returns assertion options for all spans created bySimpleTracer.static TracerAssertthen(SimpleTracer actual) Creates the assert object forSimpleTracer.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
-
Constructor Details
-
TracerAssert
Creates a new instance ofTracerAssert.- Parameters:
actual- aSimpleTracerobject to assert
-
-
Method Details
-
assertThat
Creates the assert object forSimpleTracer.- Parameters:
actual- tracer to assert against- Returns:
- meter registry assertions
-
then
Creates the assert object forSimpleTracer.- Parameters:
actual- tracer to assert against- Returns:
- meter registry assertions
-
onlySpan
Verifies that there was only one span created by aSimpleTracer.Examples:
// assertions succeed assertThat(simpleTracer).onlySpan(); // assertions fail assertThat(simpleTracerWithNoSpans).onlySpan();- Returns:
SpanAssertassertion object.- Throws:
AssertionError- if the actual value isnull.AssertionError- if there were zero or more than one spansAssertionError- if the span wasn't started- Since:
- 1.0.0
-
lastSpan
Returns assertion options for the last span created bySimpleTracer.Examples:
// assertions succeed assertThat(simpleTracer).lastSpan(); // assertions fail assertThat(simpleTracerWithNoSpans).lastSpan();- Returns:
SpanAssertassertion object.- Throws:
AssertionError- if the actual value isnull.AssertionError- if there were no spansAssertionError- if the span wasn't started- Since:
- 1.0.0
-
reportedSpans
public org.assertj.core.api.AbstractCollectionAssert<?,Collection<? extends SimpleSpan>, reportedSpans()SimpleSpan, org.assertj.core.api.ObjectAssert<SimpleSpan>> Returns assertion options for all spans created bySimpleTracer.Examples:
// assertions succeed assertThat(simpleTracer).reportedSpans(); // assertions fail assertThat(simpleTracerWithNoSpans).reportedSpans();- Returns:
SpanAssertassertion object.- Throws:
AssertionError- if the actual value isnull.AssertionError- if there were no spans created by this tracer- Since:
- 1.0.0
-