Class SnapshotMismatchException

All Implemented Interfaces:
Serializable

public class SnapshotMismatchException extends AssertionError
Thrown when the current output does not match the saved snapshot.

The exception message includes the snapshot name, and the expected and actual content are accessible for detailed diff reporting.

Since:
2.1
Version:
1.0
Author:
Marvin P. Warble Jr.
See Also:
  • Constructor Details

    • SnapshotMismatchException

      public SnapshotMismatchException(String snapshotName, String expected, String actual)
      Constructs a new SnapshotMismatchException.
      Parameters:
      snapshotName - the name of the snapshot that failed
      expected - the expected (saved) content
      actual - the actual (current) content
  • Method Details

    • getSnapshotName

      public String getSnapshotName()
      Returns the snapshot name.
      Returns:
      the snapshot name
    • getExpected

      public String getExpected()
      Returns the expected (saved) content.
      Returns:
      the expected content
    • getActual

      public String getActual()
      Returns the actual (current) content.
      Returns:
      the actual content