PathMapper¶
- public interface PathMapper<T>¶
An interface representing objects that will return an appropriate path for the approval process. Most of the times those are used because you don’t want to repeat yourself with the same parent path in com.nikolavp.approval.Approval.verify(Object,java.nio.file.Path) for the path argument. This will map your approval results file from the value for approval and a possible sub path.
Parameters: - <T> – the value that will be approved
See also: com.nikolavp.approval.pathmappers.ParentPathMapper
Methods¶
getPath¶
- Path getPath(T value, Path approvalFilePath)¶
Gets the path for the approval result based on the value that we want to approve and a sub path for that.
Parameters: - value – the value that will be approved
- approvalFilePath – a name/subpath for the approval. This will be the path that was passed to Approval.verify(Object,java.nio.file.Path)
Returns: the full path for the approval result