Class WebAppMediaFilterUnitTest

java.lang.Object
de.hybris.platform.mediaweb.WebAppMediaFilterUnitTest

@UnitTest public class WebAppMediaFilterUnitTest extends Object
  • Field Details

  • Constructor Details

    • WebAppMediaFilterUnitTest

      public WebAppMediaFilterUnitTest()
  • Method Details

    • setUp

      public void setUp() throws Exception
      Throws:
      Exception
    • shouldPrintNotAllowedMessageWhenRequestingResourceFromClassloaderAndItDoesntContainAllowedExtension

      public void shouldPrintNotAllowedMessageWhenRequestingResourceFromClassloaderAndItDoesntContainAllowedExtension() throws Exception
      Throws:
      Exception
    • shouldPrintFileNotFoundMessageWhenRequestingResourceFromClassloaderAndItDoesntExist

      public void shouldPrintFileNotFoundMessageWhenRequestingResourceFromClassloaderAndItDoesntExist() throws Exception
      Throws:
      Exception
    • shouldLoadFileFromClassloaderWhenRequestingResourceFromJarAndItExist

      public void shouldLoadFileFromClassloaderWhenRequestingResourceFromJarAndItExist() throws Exception
      Throws:
      Exception
    • shouldSend404ResponseWhenRequestingNormalResourceAndItDoesntExist

      public void shouldSend404ResponseWhenRequestingNormalResourceAndItDoesntExist() throws Exception
      Throws:
      Exception
    • shouldSend403WhenRequestTriesToAccessSecuredFolderViaNonSecureMediaFilter

      public void shouldSend403WhenRequestTriesToAccessSecuredFolderViaNonSecureMediaFilter() throws Exception
      Throws:
      Exception
    • shouldSend404ResponseWhenRequestingNormalResourceAndUnderlyingStorageStrategyWillThrowMediaNotFoundException

      public void shouldSend404ResponseWhenRequestingNormalResourceAndUnderlyingStorageStrategyWillThrowMediaNotFoundException() throws Exception
      Throws:
      Exception
    • shouldServeMediaFileAsStreamWhenRequestingNormalResource

      public void shouldServeMediaFileAsStreamWhenRequestingNormalResource() throws Exception
      Throws:
      Exception
    • shouldServeMediaFileAsStreamWhenRequestingNormalResourceWithPrettyURL

      public void shouldServeMediaFileAsStreamWhenRequestingNormalResourceWithPrettyURL() throws Exception
      Throws:
      Exception
    • shouldServeMediaFileAsStreamWhenRequestingNormalResourceWithPrettyURLFromFolderWithFancyName

      public void shouldServeMediaFileAsStreamWhenRequestingNormalResourceWithPrettyURLFromFolderWithFancyName() throws Exception
      Throws:
      Exception
    • shouldServeMediaFileAsStreamWhenRequestingNormalResourceWithPrettyURLFromFancyFolderPath

      public void shouldServeMediaFileAsStreamWhenRequestingNormalResourceWithPrettyURLFromFancyFolderPath() throws Exception
      Throws:
      Exception
    • shouldServeMediaFileAsStreamWhenRequestingNormalResourceWithPrettyURLFromRootMediaFolder

      public void shouldServeMediaFileAsStreamWhenRequestingNormalResourceWithPrettyURLFromRootMediaFolder() throws Exception
      Throws:
      Exception
    • shouldSend400ResponseWhenRequestingResourceHasMissingTenantPartForPrettyURL

      public void shouldSend400ResponseWhenRequestingResourceHasMissingTenantPartForPrettyURL() throws Exception
      Throws:
      Exception
    • shouldPassTheFilterChainIfRequestingResourceContaisNameMediasButItDoesNotMatchProperMediasPathPrefix

      public void shouldPassTheFilterChainIfRequestingResourceContaisNameMediasButItDoesNotMatchProperMediasPathPrefix() throws Exception
      Throws:
      Exception
    • shouldSend400ResponseWhenRequestingResourceHasInvalidTenantIdPrefixForPrettyURL

      public void shouldSend400ResponseWhenRequestingResourceHasInvalidTenantIdPrefixForPrettyURL() throws Exception
      Throws:
      Exception
    • shouldServeMediaFileAsStreamWithContentDispositionHeaderWhenRequestingXLSFile

      public void shouldServeMediaFileAsStreamWithContentDispositionHeaderWhenRequestingXLSFile() throws Exception
      Throws:
      Exception
    • shouldSend304ResponseWhenRequestingResourceAndRequestContainMatchingETagHeader

      public void shouldSend304ResponseWhenRequestingResourceAndRequestContainMatchingETagHeader() throws Exception
      Throws:
      Exception
    • shouldProcessStandardResponseWhenRequestingResourceAndResourcePathContainETagValueButRequestDoesNotHaveIfNonMatch

      public void shouldProcessStandardResponseWhenRequestingResourceAndResourcePathContainETagValueButRequestDoesNotHaveIfNonMatch() throws Exception
      Throws:
      Exception
    • shouldSendBadRequestResponseStatusIfMalformedURLExceptionWillBeThrown

      public void shouldSendBadRequestResponseStatusIfMalformedURLExceptionWillBeThrown() throws Exception
      Throws:
      Exception
    • shouldAddConfiguredHeadersToResponse

      public void shouldAddConfiguredHeadersToResponse() throws Exception
      Throws:
      Exception
    • shouldProcessNormalFilterChainIfRequestOrResponseAreNotHttpServletRequest

      public void shouldProcessNormalFilterChainIfRequestOrResponseAreNotHttpServletRequest() throws Exception
      Throws:
      Exception