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 PathProvider
approvedPath
(String approvedPathString) Creates a newPathProvider
that uses the given approved path}.static PathProvider
approvedPath
(Path approvedPath) Creates a newPathProvider
that uses the given approvedPath
.Set the directory where the approved and received files are stored.filenameAffix
(String filenameAffix) Extends thebaseFilename
with the givenString
.filenameExtension
(String filenameExtension) Creates a newPathProvider
with the current values and the given filenameExtension.static PathProviderBuilder
Creates aPathProviderBuilder
that uses a stack trace to determine the paths of the approved and received files.static PathProviderBuilder
Creates aPathProviderBuilder
that 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 newPathProvider
that uses the given approvedPath
.- Parameters:
approvedPath
- thePath
to the approved file- Returns:
- a new
PathProvider
-
approvedPath
Creates a newPathProvider
that uses the given approved path}.- Parameters:
approvedPathString
- the path to the approved file- Returns:
- a new
PathProvider
-
nextToTest
Creates aPathProviderBuilder
that uses a stack trace to determine the paths of the approved and received files.- Returns:
- a new
PathProviderBuilder
-
nextToTestInSubdirectory
Creates aPathProviderBuilder
that 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 thebaseFilename
with the givenString
.- Parameters:
filenameAffix
- affix to add to thebaseFilename
- Returns:
- this
-
filenameExtension
Creates a newPathProvider
with the current values and the given filenameExtension.- Parameters:
filenameExtension
- the filename extension to use- Returns:
- a new
PathProvider
with the current values and the given filenameExtension
-