Package de.skuzzle.test.snapshots
Interface StructuralAssertions
-
@API(status=STABLE) public interface StructuralAssertionsAllows to customize how structured data is compared in order to check whether a snapshot matches an actual test result.- Author:
- Simon Taddiken
- See Also:
SnapshotSerializer,StructuredData
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidassertEquals(String storedSnapshot, String serializedActual)Structurally compares two serialized objects.
-
-
-
Method Detail
-
assertEquals
void assertEquals(String storedSnapshot, String serializedActual) throws AssertionError, SnapshotException
Structurally compares two serialized objects. If comparison fails, this method should throw anAssertionErrorwith a helpful error message.- Parameters:
storedSnapshot- The persisted snapshot.serializedActual- The serialized actual test result.- Throws:
AssertionError- If both objects are not "identical" according to this implementation.SnapshotException- If any kind of technical error occurs during comparison.- API Note:
- Implementors are advised to throw
AssertionFailedErrorinstead of plainAssertionError. This allows the user to see an IDE generated diff of the actual and expected values in most IDEs.
-
-