Class DefaultLocalMediaFileCacheServiceIntegrationTest

    • Constructor Detail

      • DefaultLocalMediaFileCacheServiceIntegrationTest

        public DefaultLocalMediaFileCacheServiceIntegrationTest()
    • Method Detail

      • setUp

        public void setUp()
                   throws java.lang.Exception
        Throws:
        java.lang.Exception
      • cleanUp

        public void cleanUp()
      • shouldCacheFileOnlyOnceWhenRequestingMediaWithTheSameLocationMultipleTimes

        public void shouldCacheFileOnlyOnceWhenRequestingMediaWithTheSameLocationMultipleTimes()
                                                                                        throws java.io.IOException
        Throws:
        java.io.IOException
      • shouldNotRemoveFilesAfterInvalidationUntilAllClientsCloseTheStreams

        public void shouldNotRemoveFilesAfterInvalidationUntilAllClientsCloseTheStreams()
                                                                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • shouldStoreStreamInLocalCacheIfItDoesntExistsAndReturnItAsFileInputStream

        public void shouldStoreStreamInLocalCacheIfItDoesntExistsAndReturnItAsFileInputStream()
                                                                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • shouldReturnFileInputStreamOfAlreadyCachedStream

        public void shouldReturnFileInputStreamOfAlreadyCachedStream()
                                                              throws java.io.IOException
        Throws:
        java.io.IOException
      • shouldNotThrowExceptionsWhenLocationWithSpecialCharacters

        public void shouldNotThrowExceptionsWhenLocationWithSpecialCharacters()
                                                                       throws java.io.IOException
        Throws:
        java.io.IOException
      • shouldStoreStreamInLocalCacheIfItDoesntExistsAndReturnItAsRegularFile

        public void shouldStoreStreamInLocalCacheIfItDoesntExistsAndReturnItAsRegularFile()
      • shouldReturnRegularFileOfAlreadyCachedStream

        public void shouldReturnRegularFileOfAlreadyCachedStream()
      • shouldRemoveCachedFileFromDiskWhenDirectDeleteWasCalled

        public void shouldRemoveCachedFileFromDiskWhenDirectDeleteWasCalled()
                                                                     throws java.io.IOException
        Throws:
        java.io.IOException
      • shouldWriteEvictionMarkerFileForCachedFileTakenAsFileByTheClientInsteadRemovingFileOnEviction

        public void shouldWriteEvictionMarkerFileForCachedFileTakenAsFileByTheClientInsteadRemovingFileOnEviction()
                                                                                                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • shouldEvictExistingCacheUnitWhenItsUnderlyingFileWasDeletedAccidentally

        public void shouldEvictExistingCacheUnitWhenItsUnderlyingFileWasDeletedAccidentally()
                                                                                     throws java.lang.Exception
        Throws:
        java.lang.Exception
      • shouldNotStoreFileInTheCacheIfItIsBiggerThanEntireDeclaredCacheSize

        public void shouldNotStoreFileInTheCacheIfItIsBiggerThanEntireDeclaredCacheSize()
                                                                                 throws java.lang.Exception
        Throws:
        java.lang.Exception