Class TestFinderDecorator


  • public class TestFinderDecorator
    extends TestFinder
    A test finder decorator that reads tests from a delegate, and returns the results in the reverse/random order. This is primarily for debugging and testing purposes.
    • Constructor Detail

      • TestFinderDecorator

        public TestFinderDecorator​(TestFinder testFinder)
        Default constructor
    • Method Detail

      • getRootDir

        public java.io.File getRootDir()
        Description copied from class: TestFinder
        Get the root directory of the test suite; this is either the root passed in to the init method or if that is a file, it is the directory containing the file.
        Overrides:
        getRootDir in class TestFinder
        Returns:
        the root directory of the test suite
      • read

        public void read​(java.io.File file)
        Description copied from class: TestFinder
        Read a file, looking for test descriptions and other files that might need to be read. If the file is relative, it will be evaluated relative to getRootDir. Depending on the test finder, the file may be either a plain file or a directory.
        Overrides:
        read in class TestFinder
        Parameters:
        file - The file to be read.
      • getCurrentTestFinder

        public TestFinder getCurrentTestFinder()
      • lastModified

        public long lastModified​(java.io.File f)
        Description copied from class: TestFinder
        Determine when the last time this path was modified. This is used to decide whether to rescan that location or not. The default implementation defers the choice to the java.
        Overrides:
        lastModified in class TestFinder
        Parameters:
        f - The location in question.
      • isFolder

        public boolean isFolder​(java.io.File path)
        Description copied from class: TestFinder
        Determine whether a location corresponds to a directory (folder) or an actual file. If the finder implementation chooses, the locations used in read() and scan() may be real or virtual. This method will be queried to determine if a location is a container or something that should be scanned for tests. If it is both...
        Overrides:
        isFolder in class TestFinder
        Parameters:
        path - The location in question.
      • scan

        protected void scan​(java.io.File file)
        Description copied from class: TestFinder
        Scan a file, looking for test descriptions and other files that might need to be scanned. The implementation depends on the type of test finder.
        Specified by:
        scan in class TestFinder
        Parameters:
        file - The file to scan