Package org.approvej.verify
Class FileVerifier
java.lang.Object
org.approvej.verify.FileVerifier
Verifier that compares the received value with the approved value stored in a file. If
the values differ, it creates a new file with the received value and throws an ApprovalError.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classAFileVerifier.PathProviderthat uses the path of a previously approved file to determine the path the received file and the filename extension.static interfaceA provider for the paths of the approved and received files.static final classAFileVerifier.PathProviderthat uses a stack trace to determine the paths of the approved and received files. -
Method Summary
Modifier and TypeMethodDescriptionvoidstatic FileVerifierfile()Creates a newVerifierthat uses the stack trace to determine the paths of approved and received files.static FileVerifierCreates a newVerifierthat uses the stack trace to determine the paths of approved and received files.static FileVerifierfile(FileVerifier.PathProvider pathProvider) Creates a newVerifierthat uses the givenFileVerifier.PathProviderto determine the paths of approved and received files.
-
Method Details
-
file
Creates a newVerifierthat uses the givenFileVerifier.PathProviderto determine the paths of approved and received files.- Parameters:
pathProvider- the provider for the paths of the approved and received files- Returns:
- a new
FileVerifierthat uses the givenFileVerifier.PathProvider
-
file
Creates a newVerifierthat uses the stack trace to determine the paths of approved and received files.- Returns:
- a new
FileVerifierthat uses aFileVerifier.StackTracePathProviderto determine the paths
-
file
Creates a newVerifierthat uses the stack trace to determine the paths of approved and received files.- Parameters:
filenameExtension- the file extension to use for the approved and received files- Returns:
- a new
FileVerifierthat uses aFileVerifier.StackTracePathProviderto determine the paths - See Also:
-
accept
-