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

    Constructors
    Constructor
    Description
    Instantiates a new state context assert.
  • Method Summary

    Modifier and Type
    Method
    Description
    Verifies 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 same event as given event.
    Verifies that the actual context has the same source id as given id.
    Verifies that the actual context has the same StateContext.Stage as given StateContext.Stage.
    Verifies that the actual context has the same target id as given id.

    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, 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

      public StateContextAssert(StateContext<?,?> actual)
      Instantiates a new state context assert.
      Parameters:
      actual - the actual state context
  • Method Details

    • hasStage

      public StateContextAssert hasStage(StateContext.Stage stage)
      Verifies that the actual context has the same StateContext.Stage as given StateContext.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

      public StateContextAssert hasEvent(Object event)
      Verifies that the actual context has the same event as given event.
      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

      public StateContextAssert hasSourceId(Object id)
      Verifies that the actual context has the same source id as given id.
      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

      public StateContextAssert doesNotHaveSource()
      Verifies that the actual context does not have a source.
      Returns:
      this assertion object.
      Throws:
      AssertionError - if the machine has a source
    • hasTargetId

      public StateContextAssert hasTargetId(Object id)
      Verifies that the actual context has the same target id as given id.
      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

      public StateContextAssert doesNotHaveTarget()
      Verifies that the actual context does not have a target.
      Returns:
      this assertion object.
      Throws:
      AssertionError - if the machine has a target