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.Exception
public void tearDown() throws java.lang.Exception
java.lang.Exception
public void testAddFileWithBufferedInputStream() throws java.lang.Exception
java.lang.Exception
public void testAddFileWithByteArray() throws java.lang.Exception
java.lang.Exception
public void testAddFileWithByteArrayInputStream() throws java.lang.Exception
java.lang.Exception
public void testAddFileWithFile() throws java.lang.Exception
java.lang.Exception
public void testAddFileWithFileInputStream() throws java.lang.Exception
java.lang.Exception
public void testAddFileWithUnsyncByteArrayInputStream() throws java.lang.Exception
java.lang.Exception
public void testCopyFileVersion() throws java.lang.Exception
java.lang.Exception
public void testCopyFileVersionDuplicateFileException() throws java.lang.Exception
java.lang.Exception
public void testCopyFileVersionNoSuchFileException() throws java.lang.Exception
java.lang.Exception
public void testDeleteDirectory() throws java.lang.Exception
java.lang.Exception
public void testDeleteDirectoryWithTwoLevelDeep() throws java.lang.Exception
java.lang.Exception
public void testDeleteFile() throws java.lang.Exception
java.lang.Exception
public void testDeleteFileWithVersion() throws java.lang.Exception
java.lang.Exception
public void testGetFileAsBytesNoSuchFileException() throws java.lang.Exception
java.lang.Exception
public void testGetFileAsStream() throws java.lang.Exception
java.lang.Exception
public void testGetFileAsStreamWithVersion() throws java.lang.Exception
java.lang.Exception
public void testGetFileNames() throws java.lang.Exception
java.lang.Exception
public void testGetFileNamesWithDirectoryOneLevelDeep() throws java.lang.Exception
java.lang.Exception
public void testGetFileNamesWithDirectoryTwoLevelDeep() throws java.lang.Exception
java.lang.Exception
public void testGetFileNamesWithInvalidDirectory()
public void testGetFileNamesWithInvalidRepository() throws java.lang.Exception
java.lang.Exception
public void testGetFileNamesWithTwoLevelsDeep() throws java.lang.Exception
java.lang.Exception
public void testGetFileSize() throws java.lang.Exception
java.lang.Exception
public void testGetFileSizeNoSuchFileException() throws java.lang.Exception
java.lang.Exception
public void testGetFileVersionAsBytesNoSuchFileException() throws java.lang.Exception
java.lang.Exception
public void testHasFile() throws java.lang.Exception
java.lang.Exception
public 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.Exception
public void testUpdateFileVersionDuplicateFileException() throws java.lang.Exception
java.lang.Exception
public void testUpdateFileVersionNoSuchFileException() throws java.lang.Exception
java.lang.Exception
public void testUpdateFileVersionWithNewFileName() throws java.lang.Exception
java.lang.Exception
public void testUpdateFileWithByteArray() throws java.lang.Exception
java.lang.Exception
public void testUpdateFileWithFile() throws java.lang.Exception
java.lang.Exception
public void testUpdateFileWithInputStream() throws java.lang.Exception
java.lang.Exception
public void testUpdateFileWithNewFileName() throws java.lang.Exception
java.lang.Exception
public void testUpdateFileWithNewFileNameDuplicateFileException() throws java.lang.Exception
java.lang.Exception
public void testUpdateFileWithNewFileNameNoSuchFileException() throws java.lang.Exception
java.lang.Exception
public void testUpdateFileWithNewRepositoryId() throws java.lang.Exception
java.lang.Exception
public void testUpdateFileWithNewRepositoryIdDuplicateFileException() throws java.lang.Exception
java.lang.Exception
public void testUpdateFileWithNewRepositoryIdNoSuchFileException() throws java.lang.Exception
java.lang.Exception
protected void addVersions(java.lang.String fileName, int newVersionCount) throws java.lang.Exception
java.lang.Exception
protected java.io.File createFile(byte[] fileData) throws java.io.IOException
java.io.IOException
protected abstract com.liferay.document.library.kernel.store.Store getStore()