Class StateContextAssert
java.lang.Object
org.assertj.core.api.AbstractAssert<StateContextAssert,StateContext<?,?>>
org.springframework.statemachine.test.assertj.StateContextAssert
- All Implemented Interfaces:
org.assertj.core.api.Assert<StateContextAssert,
,StateContext<?, ?>> org.assertj.core.api.Descriptable<StateContextAssert>
,org.assertj.core.api.ExtensionPoints<StateContextAssert,
StateContext<?, ?>>
public class StateContextAssert
extends org.assertj.core.api.AbstractAssert<StateContextAssert,StateContext<?,?>>
Assertions applicable to a
StateContext
.-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals
-
Constructor Summary
ConstructorDescriptionStateContextAssert
(StateContext<?, ?> actual) Instantiates a new state context assert. -
Method Summary
Modifier and TypeMethodDescriptionVerifies that the actual context does not have a source.Verifies that the actual context does not have a target.Verifies that the actual context has the sameevent
as givenevent
.hasSourceId
(Object id) Verifies that the actual context has the samesource id
as givenid
.hasStage
(StateContext.Stage stage) Verifies that the actual context has the sameStateContext.Stage
as givenStateContext.Stage
.hasTargetId
(Object id) Verifies that the actual context has the sametarget id
as givenid
.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, satisfies, satisfiesAnyOf, satisfiesAnyOf, satisfiesAnyOfForProxy, satisfiesForProxy, 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
-
Constructor Details
-
StateContextAssert
Instantiates a new state context assert.- Parameters:
actual
- the actual state context
-
-
Method Details
-
hasStage
Verifies that the actual context has the sameStateContext.Stage
as givenStateContext.Stage
.- Parameters:
stage
- the expected stage- Returns:
this
assertion object.- Throws:
AssertionError
- if the stage of the actual context is not equal to the given one.
-
hasEvent
Verifies that the actual context has the sameevent
as givenevent
.- Parameters:
event
- the expected event- Returns:
this
assertion object.- Throws:
AssertionError
- if the stage of the actual context is not equal to the given one.
-
hasSourceId
Verifies that the actual context has the samesource id
as givenid
.- Parameters:
id
- the expected source id- Returns:
this
assertion object.- Throws:
AssertionError
- if the source id of the actual context is not equal to the given one.
-
doesNotHaveSource
Verifies that the actual context does not have a source.- Returns:
this
assertion object.- Throws:
AssertionError
- if the machine has a source
-
hasTargetId
Verifies that the actual context has the sametarget id
as givenid
.- Parameters:
id
- the expected target id- Returns:
this
assertion object.- Throws:
AssertionError
- if the target id of the actual context is not equal to the given one.
-
doesNotHaveTarget
Verifies that the actual context does not have a target.- Returns:
this
assertion object.- Throws:
AssertionError
- if the machine has a target
-