Class MockFileSystemTestCase

java.lang.Object
org.junit.Assert
org.apache.lucene.tests.util.LuceneTestCase
org.apache.lucene.tests.mockfile.MockFileSystemTestCase

@SuppressFileSystems("*") public abstract class MockFileSystemTestCase extends LuceneTestCase
Base class for testing mockfilesystems. This tests things that really need to work: Path equals()/hashcode(), directory listing glob and filtering, URI conversion, etc.
  • Constructor Details

    • MockFileSystemTestCase

      public MockFileSystemTestCase()
  • Method Details

    • wrap

      protected abstract Path wrap(Path path)
      wraps Path with custom behavior
    • testHashCodeEquals

      public void testHashCodeEquals() throws IOException
      Test that Path.hashcode/equals are sane
      Throws:
      IOException
    • testURI

      public void testURI() throws IOException
      Test that URIs are not corrumpted
      Throws:
      IOException
    • testURIumlaute

      public void testURIumlaute() throws IOException
      Throws:
      IOException
    • testURIchinese

      public void testURIchinese() throws IOException
      Throws:
      IOException
    • testDirectoryStreamFiltered

      public void testDirectoryStreamFiltered() throws IOException
      Tests that newDirectoryStream with a filter works correctly
      Throws:
      IOException
    • testDirectoryStreamGlobFiltered

      public void testDirectoryStreamGlobFiltered() throws IOException
      Tests that newDirectoryStream with globbing works correctly
      Throws:
      IOException