Package spock.lang

Annotation Type Snapshot


@Beta @Retention(RUNTIME) @Target({FIELD,PARAMETER}) public @interface Snapshot
Injects a Snapshotter instance into a field or parameter.

It can also inject subclasses of Snapshotter, as long as they have a public constructor with a single Snapshotter.Store parameter.

Default values are configured via the SnapshotConfig.

Since:
2.4
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The name of the Charset to use when storing and reading the snapshot.
    The file extension to use for the snapshot files.
  • Element Details

    • extension

      String extension
      The file extension to use for the snapshot files. Defaults to what is configured in the SnapshotConfig.
      Default:
      "<default>"
    • charset

      String charset
      The name of the Charset to use when storing and reading the snapshot. Defaults to "UTF-8".
      Default:
      "UTF-8"