Class MediaUtilTest


  • @UnitTest
    public class MediaUtilTest
    extends java.lang.Object
    Intention of this test is to cover all lightweight methods which DO NOT start platform/tenant. Other methods are tested in separate tests. If you like to test any method which must startup tenant please use MediaUtilIntegrationTest.
    • Constructor Detail

      • MediaUtilTest

        public MediaUtilTest()
    • Method Detail

      • shouldNormalizeRealFileNameAndReplaceAllNonAlphabeticCharactersToSingleDash

        public void shouldNormalizeRealFileNameAndReplaceAllNonAlphabeticCharactersToSingleDash()
      • shouldRemoveFileExtsionFromFileName

        public void shouldRemoveFileExtsionFromFileName()
      • shouldNotTouchFileNameOnExtensionRemovalWhenFileNameDoesNotHaveExtension

        public void shouldNotTouchFileNameOnExtensionRemovalWhenFileNameDoesNotHaveExtension()
      • shouldThrowIllegalArgumentExceptionWhenTryingToRemoveExtensionFromNullFileName

        public void shouldThrowIllegalArgumentExceptionWhenTryingToRemoveExtensionFromNullFileName()
      • shouldAddLeadingFileSerparatorToPath

        public void shouldAddLeadingFileSerparatorToPath()
      • shouldNotAddLeadingFileSerparatorToPathWhenPathAlreadyContainIt

        public void shouldNotAddLeadingFileSerparatorToPathWhenPathAlreadyContainIt()
      • shouldReturnEmptyPathOnTryingToAddLeadingFileSeparatorToEmptyPath

        public void shouldReturnEmptyPathOnTryingToAddLeadingFileSeparatorToEmptyPath()
      • shouldReturnEmptyPathOnTryingToAddLeadingFileSeparatorToNullPath

        public void shouldReturnEmptyPathOnTryingToAddLeadingFileSeparatorToNullPath()
      • shouldAddTrailingFileSerparatorToPath

        public void shouldAddTrailingFileSerparatorToPath()
      • shouldNotAddTrailingFileSerparatorToPathWhenPathAlreadyContainIt

        public void shouldNotAddTrailingFileSerparatorToPathWhenPathAlreadyContainIt()
      • shouldReturnEmptyPathOnTryingToAddTrailingFileSeparatorToEmptyPath

        public void shouldReturnEmptyPathOnTryingToAddTrailingFileSeparatorToEmptyPath()
      • shouldReturnEmptyPathOnTryingToAddTrailingFileSeparatorToNullPath

        public void shouldReturnEmptyPathOnTryingToAddTrailingFileSeparatorToNullPath()
      • shouldConcatenateMediaFolderPathToGivenDirectoryAndReturnAsFileObject

        public void shouldConcatenateMediaFolderPathToGivenDirectoryAndReturnAsFileObject()
      • shouldReturnDirPathWhenConcatenatingMediaFolderToGivenDirectoryAndMediaFolderIsNull

        public void shouldReturnDirPathWhenConcatenatingMediaFolderToGivenDirectoryAndMediaFolderIsNull()
      • shouldReturnFileExtensionFromGivenFileName

        public void shouldReturnFileExtensionFromGivenFileName()
      • shouldReturnLowerCaseFileExtensionFromGivenFileNameIfInitiallyItIsUppercase

        public void shouldReturnLowerCaseFileExtensionFromGivenFileNameIfInitiallyItIsUppercase()
      • shouldReturnBaseFileNameNoCaseChangeOnGetFileExtensionWhenThereIsNoExtension

        public void shouldReturnBaseFileNameNoCaseChangeOnGetFileExtensionWhenThereIsNoExtension()
      • shouldComposeFileFromParentAndChildIfChildIsNotEmpty

        public void shouldComposeFileFromParentAndChildIfChildIsNotEmpty()
      • shouldComposeFileFromParentOnlyIfChildIsEmpty

        public void shouldComposeFileFromParentOnlyIfChildIsEmpty()
      • shouldFailWhenEffectiveFileIsNotInTheParrentDirectory

        public void shouldFailWhenEffectiveFileIsNotInTheParrentDirectory()
      • shouldNotFailWhenEffectiveFileIsInTheParrentDirectory

        public void shouldNotFailWhenEffectiveFileIsInTheParrentDirectory()