Annotation Type State


  • @Retention(RUNTIME)
    @Target(METHOD)
    @Inherited
    public @interface State
    Used to mark methods that should be run on state change
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String[] value  
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      StateChangeAction action
      Whether to run the method before (SETUP) or after (TEARDOWN) the interaction
      java.lang.String comment
      Comment associated with the state change callback
    • Element Detail

      • value

        java.lang.String[] value
        Returns:
        list of state names
      • action

        StateChangeAction action
        Whether to run the method before (SETUP) or after (TEARDOWN) the interaction
        Default:
        au.com.dius.pact.provider.junitsupport.StateChangeAction.SETUP
      • comment

        java.lang.String comment
        Comment associated with the state change callback
        Default:
        ""