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.- Author:
- Janne Valkealahti
-
Field Summary
Fields inherited from class org.assertj.core.api.AbstractAssert
actual, info, myself, objects, throwUnsupportedExceptionOnEquals -
Constructor Summary
ConstructorsConstructorDescriptionStateContextAssert(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 sameeventas givenevent.hasSourceId(Object id) Verifies that the actual context has the samesource idas givenid.hasStage(StateContext.Stage stage) Verifies that the actual context has the sameStateContext.Stageas givenStateContext.Stage.hasTargetId(Object id) Verifies that the actual context has the sametarget idas givenid.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
-
StateContextAssert
Instantiates a new state context assert.- Parameters:
actual- the actual state context
-
-
Method Details
-
hasStage
Verifies that the actual context has the sameStateContext.Stageas givenStateContext.Stage.- Parameters:
stage- the expected stage- Returns:
thisassertion 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 sameeventas givenevent.- Parameters:
event- the expected event- Returns:
thisassertion 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 idas givenid.- Parameters:
id- the expected source id- Returns:
thisassertion 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:
thisassertion object.- Throws:
AssertionError- if the machine has a source
-
hasTargetId
Verifies that the actual context has the sametarget idas givenid.- Parameters:
id- the expected target id- Returns:
thisassertion 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:
thisassertion object.- Throws:
AssertionError- if the machine has a target
-