public abstract class BaseStoreTestCase
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected long |
companyId |
protected long |
repositoryId |
protected com.liferay.document.library.kernel.store.Store |
store |
| Constructor and Description |
|---|
BaseStoreTestCase() |
protected long companyId
protected long repositoryId
protected com.liferay.document.library.kernel.store.Store store
public void setUp()
throws java.lang.Exception
java.lang.Exceptionpublic void tearDown()
throws java.lang.Exception
java.lang.Exceptionpublic void testAddFileWithBufferedInputStream()
throws java.lang.Exception
java.lang.Exceptionpublic void testAddFileWithByteArray()
throws java.lang.Exception
java.lang.Exceptionpublic void testAddFileWithByteArrayInputStream()
throws java.lang.Exception
java.lang.Exceptionpublic void testAddFileWithFile()
throws java.lang.Exception
java.lang.Exceptionpublic void testAddFileWithFileInputStream()
throws java.lang.Exception
java.lang.Exceptionpublic void testAddFileWithUnsyncByteArrayInputStream()
throws java.lang.Exception
java.lang.Exceptionpublic void testCopyFileVersion()
throws java.lang.Exception
java.lang.Exceptionpublic void testCopyFileVersionDuplicateFileException()
throws java.lang.Exception
java.lang.Exceptionpublic void testCopyFileVersionNoSuchFileException()
throws java.lang.Exception
java.lang.Exceptionpublic void testDeleteDirectory()
throws java.lang.Exception
java.lang.Exceptionpublic void testDeleteDirectoryWithTwoLevelDeep()
throws java.lang.Exception
java.lang.Exceptionpublic void testDeleteFile()
throws java.lang.Exception
java.lang.Exceptionpublic void testDeleteFileWithVersion()
throws java.lang.Exception
java.lang.Exceptionpublic void testGetFileAsBytesNoSuchFileException()
throws java.lang.Exception
java.lang.Exceptionpublic void testGetFileAsStream()
throws java.lang.Exception
java.lang.Exceptionpublic void testGetFileAsStreamWithVersion()
throws java.lang.Exception
java.lang.Exceptionpublic void testGetFileNames()
throws java.lang.Exception
java.lang.Exceptionpublic void testGetFileNamesWithDirectoryOneLevelDeep()
throws java.lang.Exception
java.lang.Exceptionpublic void testGetFileNamesWithDirectoryTwoLevelDeep()
throws java.lang.Exception
java.lang.Exceptionpublic void testGetFileNamesWithInvalidDirectory()
public void testGetFileNamesWithInvalidRepository()
throws java.lang.Exception
java.lang.Exceptionpublic void testGetFileNamesWithTwoLevelsDeep()
throws java.lang.Exception
java.lang.Exceptionpublic void testGetFileSize()
throws java.lang.Exception
java.lang.Exceptionpublic void testGetFileSizeNoSuchFileException()
throws java.lang.Exception
java.lang.Exceptionpublic void testGetFileVersionAsBytesNoSuchFileException()
throws java.lang.Exception
java.lang.Exceptionpublic void testGetFileVersions()
throws java.lang.Exception
java.lang.Exceptionpublic void testHasFile()
throws java.lang.Exception
java.lang.Exceptionpublic void testHasFileWithVersion()
throws java.lang.Exception
java.lang.Exception@ExpectedLogs(expectedLogs=@ExpectedLog(expectedLog="Unable to delete file {companyId=",expectedType=PREFIX), level="WARN", loggerClass=com.liferay.document.library.kernel.store.BaseStore.class) public void testLogFailedDeletion()
@ExpectedLogs(expectedLogs=@ExpectedLog(expectedLog="Unable to delete file {companyId=",expectedType=PREFIX), level="WARN", loggerClass=com.liferay.document.library.kernel.store.BaseStore.class) public void testLogFailedDeletionWithVersionLabel()
public void testUpdateFileVersion()
throws java.lang.Exception
java.lang.Exceptionpublic void testUpdateFileVersionDuplicateFileException()
throws java.lang.Exception
java.lang.Exceptionpublic void testUpdateFileVersionNoSuchFileException()
throws java.lang.Exception
java.lang.Exceptionpublic void testUpdateFileVersionWithNewFileName()
throws java.lang.Exception
java.lang.Exceptionpublic void testUpdateFileWithByteArray()
throws java.lang.Exception
java.lang.Exceptionpublic void testUpdateFileWithFile()
throws java.lang.Exception
java.lang.Exceptionpublic void testUpdateFileWithInputStream()
throws java.lang.Exception
java.lang.Exceptionpublic void testUpdateFileWithNewFileName()
throws java.lang.Exception
java.lang.Exceptionpublic void testUpdateFileWithNewFileNameDuplicateFileException()
throws java.lang.Exception
java.lang.Exceptionpublic void testUpdateFileWithNewFileNameNoSuchFileException()
throws java.lang.Exception
java.lang.Exceptionpublic void testUpdateFileWithNewRepositoryId()
throws java.lang.Exception
java.lang.Exceptionpublic void testUpdateFileWithNewRepositoryIdDuplicateFileException()
throws java.lang.Exception
java.lang.Exceptionpublic void testUpdateFileWithNewRepositoryIdNoSuchFileException()
throws java.lang.Exception
java.lang.Exceptionprotected void addVersions(java.lang.String fileName,
int newVersionCount)
throws java.lang.Exception
java.lang.Exceptionprotected java.io.File createFile(byte[] fileData)
throws java.io.IOException
java.io.IOExceptionprotected abstract com.liferay.document.library.kernel.store.Store getStore()