Package org.approvej.approve
Class PathProviderBuilder
java.lang.Object
org.approvej.approve.PathProviderBuilder
A builder for creating
PathProvider instances.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic PathProviderapprovedPath(String approvedPathString) Creates a newPathProviderthat uses the given approved path}.static PathProviderapprovedPath(Path approvedPath) Creates a newPathProviderthat uses the given approvedPath.Set the directory where the approved and received files are stored.filenameAffix(String filenameAffix) Extends thebaseFilenamewith the givenString.filenameExtension(String filenameExtension) Creates a newPathProviderwith the current values and the given filenameExtension.static PathProviderBuilderCreates aPathProviderBuilderthat uses a stack trace to determine the paths of the approved and received files.static PathProviderBuilderCreates aPathProviderBuilderthat uses a stack trace to determine the paths of the approved and received files in a subdirectory named after the currect test class simple name.
-
Field Details
-
RECEIVED
The infix of the file containing the latest received value that didn't match the previously approved.- See Also:
-
APPROVED
The infix of the file containing a previously approved value.- See Also:
-
-
Method Details
-
approvedPath
Creates a newPathProviderthat uses the given approvedPath.- Parameters:
approvedPath- thePathto the approved file- Returns:
- a new
PathProvider
-
approvedPath
Creates a newPathProviderthat uses the given approved path}.- Parameters:
approvedPathString- the path to the approved file- Returns:
- a new
PathProvider
-
nextToTest
Creates aPathProviderBuilderthat uses a stack trace to determine the paths of the approved and received files.- Returns:
- a new
PathProviderBuilder
-
nextToTestInSubdirectory
Creates aPathProviderBuilderthat uses a stack trace to determine the paths of the approved and received files in a subdirectory named after the currect test class simple name.- Returns:
- a new
PathProviderBuilder
-
directory
Set the directory where the approved and received files are stored.- Parameters:
directory- the directory where the approved and received files are stored- Returns:
- this
-
filenameAffix
Extends thebaseFilenamewith the givenString.- Parameters:
filenameAffix- affix to add to thebaseFilename- Returns:
- this
-
filenameExtension
Creates a newPathProviderwith the current values and the given filenameExtension.- Parameters:
filenameExtension- the filename extension to use- Returns:
- a new
PathProviderwith the current values and the given filenameExtension
-