JunitPathMapper¶
- public class JunitPathMapper implements TestRule, PathMapper, FullPathMapper¶
A path mapper that have to be declared as a org.junit.Rule and will use the standard junit mechanisms to put your approval results in $package-name-with-slashes/$classname/$methodname.
This class can be used as a com.nikolavp.approval.PathMapper in which case it will put your approval results in that directory or you can use it as a com.nikolavp.approval.FullPathMapper in which case your approval result for the single virifacion will be put in a file with that path. In the latter case you will have to make sure that there aren’t two approvals for a single test method.