Class NextToTestPathProvider

java.lang.Object
org.approvej.approve.NextToTestPathProvider
All Implemented Interfaces:
PathProvider

@NullMarked public class NextToTestPathProvider extends Object implements PathProvider
A PathProvider that uses a stack trace to determine the paths of the approved and received files.
  • Method Details

    • inSubdirectory

      public NextToTestPathProvider inSubdirectory()
      Use a subdirectory named after the test class name.
      Returns:
      this
    • filenameExtension

      public NextToTestPathProvider filenameExtension(String filenameExtension)
      Use the given filenameExtension for the approved and received files.
      Parameters:
      filenameExtension - the filename extension to use
      Returns:
      this
    • directory

      public Path directory()
      Description copied from interface: PathProvider
      The path of the directory containing the approved and received files.
      Specified by:
      directory in interface PathProvider
      Returns:
      the Path to the directory
    • receivedPath

      public Path receivedPath()
      Description copied from interface: PathProvider
      The path of the file containing the latest received value that didn't match the previously approved.
      Specified by:
      receivedPath in interface PathProvider
      Returns:
      the Path to the received file
    • approvedPath

      public Path approvedPath()
      Description copied from interface: PathProvider
      The path of the file containing a previously approved value.
      Specified by:
      approvedPath in interface PathProvider
      Returns:
      the Path to the approved file