Package de.skuzzle.test.snapshots
Interface SnapshotDsl.ChooseDataFormat
-
- Enclosing interface:
- SnapshotDsl
@API(status=STABLE) public static interface SnapshotDsl.ChooseDataFormatAllows to choose the structure into which the actual test result will be serialized. A custom serializer can be passed usingas(SnapshotSerializer).- Author:
- Simon Taddiken
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SnapshotDsl.ChooseAssertionsas(SnapshotSerializer serializer)Specify the serialization format.SnapshotDsl.ChooseStructureas(StructuredDataProvider structuredDataBuilder)Specify the serialization format and the way in which serialized objects are compared.SnapshotDsl.ChooseAssertionsasText()"Serializes" the actual test result usingObject.toString()and compares the results using a generic string diff algorithm.
-
-
-
Method Detail
-
asText
SnapshotDsl.ChooseAssertions asText()
"Serializes" the actual test result usingObject.toString()and compares the results using a generic string diff algorithm.Calling this method is equivalent to calling
.as(TextSnapshot.text).- Returns:
- Fluent API object for performing the snapshot assertion. Do NOT assume it is the same object as 'this'!
- Since:
- 0.0.4
- See Also:
as(StructuredDataProvider)
-
as
SnapshotDsl.ChooseStructure as(StructuredDataProvider structuredDataBuilder)
Specify the serialization format and the way in which serialized objects are compared. AStructuredDatainstance combines both aSnapshotSerializerand aStructuralAssertionsinstance.- Parameters:
structuredDataBuilder- TheStructuredDataProviderinstance.- Returns:
- Fluent API object for performing the snapshot assertion. Do NOT assume it is the same object as 'this'!
- See Also:
StructuredData
-
as
SnapshotDsl.ChooseAssertions as(SnapshotSerializer serializer)
Specify the serialization format.- Parameters:
serializer- The serializer to use.- Returns:
- Fluent API object for performing the snapshot assertion. Do NOT assume it is the same object as 'this'!
-
-