Package com.oorian.testing
Class SnapshotMismatchException
java.lang.Object
java.lang.Throwable
java.lang.Error
java.lang.AssertionError
com.oorian.testing.SnapshotMismatchException
- All Implemented Interfaces:
Serializable
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 Summary
ConstructorsConstructorDescriptionSnapshotMismatchException(String snapshotName, String expected, String actual) Constructs a new SnapshotMismatchException. -
Method Summary
Modifier and TypeMethodDescriptionReturns the actual (current) content.Returns the expected (saved) content.Returns the snapshot name.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
SnapshotMismatchException
Constructs a new SnapshotMismatchException.- Parameters:
snapshotName- the name of the snapshot that failedexpected- the expected (saved) contentactual- the actual (current) content
-
-
Method Details
-
getSnapshotName
Returns the snapshot name.- Returns:
- the snapshot name
-
getExpected
Returns the expected (saved) content.- Returns:
- the expected content
-
getActual
Returns the actual (current) content.- Returns:
- the actual content
-