Enum Class CaseKind

java.lang.Object
java.lang.Enum<CaseKind>
com.arc_e_tect.gradle.apionly.transcriberj.spi.CaseKind
All Implemented Interfaces:
Serializable, Comparable<CaseKind>, Constable

public enum CaseKind extends Enum<CaseKind>
What a contract case tests: which response the contract declares for its request, and so what a target must do before the request is sent.
  • Nested Class Summary

    Nested classes/interfaces inherited from class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    A request with exactly one constraint violated, expecting the configured invalid-request status.
    A valid request whose Accept no declared response offers, expecting the declared 406.
    A valid request naming a resource that does not exist, expecting the declared 404.
    A valid request, expecting an exact 2xx the operation declares.
    The valid body sent with a content type the operation does not accept, expecting the declared 415.
  • Method Summary

    Modifier and Type
    Method
    Description
    static CaseKind
    ofSetting(String setting)
    The kind a setting name names.
    boolean
    Whether a case of this kind can only pass when the target is in a particular state, which a fixture must arrange before the request is sent.
    How a project names this kind in the derive setting, such as notFound.
    static List<String>
    Every kind's setting name, in canonical order: the default of the derive setting.
    static CaseKind
    Returns the enum constant of this class with the specified name.
    static CaseKind[]
    Returns an array containing the constants of this enum class, in the order they are declared.

    Methods inherited from class java.lang.Object

    getClass, notify, notifyAll, wait, wait, wait
  • Enum Constant Details

    • SUCCESS

      public static final CaseKind SUCCESS
      A valid request, expecting an exact 2xx the operation declares. Requires state: the resource exists for a read, an update or a delete, and does not for a create.
    • NOT_FOUND

      public static final CaseKind NOT_FOUND
      A valid request naming a resource that does not exist, expecting the declared 404. Requires state: the resource the path names must be absent.
    • NOT_ACCEPTABLE

      public static final CaseKind NOT_ACCEPTABLE
      A valid request whose Accept no declared response offers, expecting the declared 406.
    • UNSUPPORTED_MEDIA_TYPE

      public static final CaseKind UNSUPPORTED_MEDIA_TYPE
      The valid body sent with a content type the operation does not accept, expecting the declared 415.
    • INVALID_REQUEST

      public static final CaseKind INVALID_REQUEST
      A request with exactly one constraint violated, expecting the configured invalid-request status.
  • Method Details

    • values

      public static CaseKind[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CaseKind valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • setting

      public String setting()
      How a project names this kind in the derive setting, such as notFound.
      Returns:
      the name
    • requiresState

      public boolean requiresState()
      Whether a case of this kind can only pass when the target is in a particular state, which a fixture must arrange before the request is sent.
      Returns:
      whether it requires state
    • settings

      public static List<String> settings()
      Every kind's setting name, in canonical order: the default of the derive setting.
      Returns:
      the names
    • ofSetting

      public static CaseKind ofSetting(String setting)
      The kind a setting name names.
      Parameters:
      setting - the name, such as notFound
      Returns:
      the kind
      Throws:
      IllegalArgumentException - when no kind has that name