Class MockFileAcquirer

  • All Implemented Interfaces:
    FileAcquirer

    public abstract class MockFileAcquirer
    extends Object
    implements FileAcquirer
    For use when testing searchers that uses file distribution.
    Author:
    Tony Vaagenes
    • Constructor Detail

      • MockFileAcquirer

        public MockFileAcquirer()
    • Method Detail

      • returnFile

        public static FileAcquirer returnFile​(File file)
        Creates a FileAcquirer that always returns the given file.
      • returnFiles

        public static FileAcquirer returnFiles​(Map<String,​File> files)
        Creates a FileAcquirer that maps from fileReference.value to a file.
      • throwTimeoutException

        public static FileAcquirer throwTimeoutException()
        Creates a FileAcquirer that throws TimeoutException
      • throwFileReferenceDoesNotExistException

        public static FileAcquirer throwFileReferenceDoesNotExistException()
        Creates a FileAcquirer that throws FileReferenceDoesNotExistException