Package de.hybris.platform.mediaweb
Class WebAppMediaFilterUnitTest
java.lang.Object
de.hybris.platform.mediaweb.WebAppMediaFilterUnitTest
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidsetUp()voidvoidvoidshouldPassTheFilterChainIfRequestingResourceContaisNameMediasButItDoesNotMatchProperMediasPathPrefix()voidvoidshouldPrintNotAllowedMessageWhenRequestingResourceFromClassloaderAndItDoesntContainAllowedExtension()voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoid
-
Field Details
-
HEADER_X_CONTENT_OPTIONS
- See Also:
-
NOSNIFF
- See Also:
-
-
Constructor Details
-
WebAppMediaFilterUnitTest
public WebAppMediaFilterUnitTest()
-
-
Method Details
-
setUp
- Throws:
Exception
-
shouldPrintNotAllowedMessageWhenRequestingResourceFromClassloaderAndItDoesntContainAllowedExtension
public void shouldPrintNotAllowedMessageWhenRequestingResourceFromClassloaderAndItDoesntContainAllowedExtension() throws Exception- Throws:
Exception
-
shouldPrintFileNotFoundMessageWhenRequestingResourceFromClassloaderAndItDoesntExist
public void shouldPrintFileNotFoundMessageWhenRequestingResourceFromClassloaderAndItDoesntExist() throws Exception- Throws:
Exception
-
shouldLoadFileFromClassloaderWhenRequestingResourceFromJarAndItExist
- Throws:
Exception
-
shouldSend404ResponseWhenRequestingNormalResourceAndItDoesntExist
- Throws:
Exception
-
shouldSend403WhenRequestTriesToAccessSecuredFolderViaNonSecureMediaFilter
public void shouldSend403WhenRequestTriesToAccessSecuredFolderViaNonSecureMediaFilter() throws Exception- Throws:
Exception
-
shouldSend404ResponseWhenRequestingNormalResourceAndUnderlyingStorageStrategyWillThrowMediaNotFoundException
public void shouldSend404ResponseWhenRequestingNormalResourceAndUnderlyingStorageStrategyWillThrowMediaNotFoundException() throws Exception- Throws:
Exception
-
shouldServeMediaFileAsStreamWhenRequestingNormalResource
- 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
- Throws:
Exception
-
shouldProcessNormalFilterChainIfRequestOrResponseAreNotHttpServletRequest
public void shouldProcessNormalFilterChainIfRequestOrResponseAreNotHttpServletRequest() throws Exception- Throws:
Exception
-