Liferay 7.0-ce-b4

com.liferay.portlet.documentlibrary.store.test
Class BaseStoreTestCase

java.lang.Object
  extended by com.liferay.portlet.documentlibrary.store.test.BaseStoreTestCase

public abstract class BaseStoreTestCase
extends Object


Field Summary
protected  long companyId
           
protected  long repositoryId
           
protected  Store store
           
 
Constructor Summary
BaseStoreTestCase()
           
 
Method Summary
protected  void addVersions(String fileName, int newVersionCount)
           
protected  File createFile(byte[] fileData)
           
protected abstract  String getStoreType()
           
 void setUp()
           
 void tearDown()
           
 void testAddFileWithBufferedInputStream()
           
 void testAddFileWithByteArray()
           
 void testAddFileWithByteArrayInputStream()
           
 void testAddFileWithFile()
           
 void testAddFileWithFileInputStream()
           
 void testAddFileWithUnsyncByteArrayInputStream()
           
 void testCopyFileVersion()
           
 void testCopyFileVersionDuplicateFileException()
           
 void testCopyFileVersionNoSuchFileException()
           
 void testDeleteDirectory()
           
 void testDeleteDirectoryWithTwoLevelDeep()
           
 void testDeleteFile()
           
 void testDeleteFileWithVersion()
           
 void testGetFileAsBytesNoSuchFileException()
           
 void testGetFileAsStream()
           
 void testGetFileAsStreamWithVersion()
           
 void testGetFileNames()
           
 void testGetFileNamesWithDirectoryOneLevelDeep()
           
 void testGetFileNamesWithDirectoryTwoLevelDeep()
           
 void testGetFileNamesWithInvalidDirectory()
           
 void testGetFileNamesWithInvalidRepository()
           
 void testGetFileNamesWithTwoLevelsDeep()
           
 void testGetFileSize()
           
 void testGetFileSizeNoSuchFileException()
           
 void testGetFileVersionAsBytesNoSuchFileException()
           
 void testHasFile()
           
 void testHasFileWithVersion()
           
 void testLogFailedDeletion()
           
 void testLogFailedDeletionWithVersionLabel()
           
 void testUpdateFileVersion()
           
 void testUpdateFileVersionDuplicateFileException()
           
 void testUpdateFileVersionNoSuchFileException()
           
 void testUpdateFileVersionWithNewFileName()
           
 void testUpdateFileWithByteArray()
           
 void testUpdateFileWithFile()
           
 void testUpdateFileWithInputStream()
           
 void testUpdateFileWithNewFileName()
           
 void testUpdateFileWithNewFileNameDuplicateFileException()
           
 void testUpdateFileWithNewFileNameNoSuchFileException()
           
 void testUpdateFileWithNewRepositoryId()
           
 void testUpdateFileWithNewRepositoryIdDuplicateFileException()
           
 void testUpdateFileWithNewRepositoryIdNoSuchFileException()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

companyId

protected long companyId

repositoryId

protected long repositoryId

store

protected Store store
Constructor Detail

BaseStoreTestCase

public BaseStoreTestCase()
Method Detail

setUp

public void setUp()
           throws Exception
Throws:
Exception

tearDown

public void tearDown()
              throws Exception
Throws:
Exception

testAddFileWithBufferedInputStream

public void testAddFileWithBufferedInputStream()
                                        throws Exception
Throws:
Exception

testAddFileWithByteArray

public void testAddFileWithByteArray()
                              throws Exception
Throws:
Exception

testAddFileWithByteArrayInputStream

public void testAddFileWithByteArrayInputStream()
                                         throws Exception
Throws:
Exception

testAddFileWithFile

public void testAddFileWithFile()
                         throws Exception
Throws:
Exception

testAddFileWithFileInputStream

public void testAddFileWithFileInputStream()
                                    throws Exception
Throws:
Exception

testAddFileWithUnsyncByteArrayInputStream

public void testAddFileWithUnsyncByteArrayInputStream()
                                               throws Exception
Throws:
Exception

testCopyFileVersion

public void testCopyFileVersion()
                         throws Exception
Throws:
Exception

testCopyFileVersionDuplicateFileException

public void testCopyFileVersionDuplicateFileException()
                                               throws Exception
Throws:
Exception

testCopyFileVersionNoSuchFileException

public void testCopyFileVersionNoSuchFileException()
                                            throws Exception
Throws:
Exception

testDeleteDirectory

public void testDeleteDirectory()
                         throws Exception
Throws:
Exception

testDeleteDirectoryWithTwoLevelDeep

public void testDeleteDirectoryWithTwoLevelDeep()
                                         throws Exception
Throws:
Exception

testDeleteFile

public void testDeleteFile()
                    throws Exception
Throws:
Exception

testDeleteFileWithVersion

public void testDeleteFileWithVersion()
                               throws Exception
Throws:
Exception

testGetFileAsBytesNoSuchFileException

public void testGetFileAsBytesNoSuchFileException()
                                           throws Exception
Throws:
Exception

testGetFileAsStream

public void testGetFileAsStream()
                         throws Exception
Throws:
Exception

testGetFileAsStreamWithVersion

public void testGetFileAsStreamWithVersion()
                                    throws Exception
Throws:
Exception

testGetFileNames

public void testGetFileNames()
                      throws Exception
Throws:
Exception

testGetFileNamesWithDirectoryOneLevelDeep

public void testGetFileNamesWithDirectoryOneLevelDeep()
                                               throws Exception
Throws:
Exception

testGetFileNamesWithDirectoryTwoLevelDeep

public void testGetFileNamesWithDirectoryTwoLevelDeep()
                                               throws Exception
Throws:
Exception

testGetFileNamesWithInvalidDirectory

public void testGetFileNamesWithInvalidDirectory()

testGetFileNamesWithInvalidRepository

public void testGetFileNamesWithInvalidRepository()
                                           throws Exception
Throws:
Exception

testGetFileNamesWithTwoLevelsDeep

public void testGetFileNamesWithTwoLevelsDeep()
                                       throws Exception
Throws:
Exception

testGetFileSize

public void testGetFileSize()
                     throws Exception
Throws:
Exception

testGetFileSizeNoSuchFileException

public void testGetFileSizeNoSuchFileException()
                                        throws Exception
Throws:
Exception

testGetFileVersionAsBytesNoSuchFileException

public void testGetFileVersionAsBytesNoSuchFileException()
                                                  throws Exception
Throws:
Exception

testHasFile

public void testHasFile()
                 throws Exception
Throws:
Exception

testHasFileWithVersion

public void testHasFileWithVersion()
                            throws Exception
Throws:
Exception

testLogFailedDeletion

@ExpectedLogs(expectedLogs=@ExpectedLog(expectedLog="Unable to delete file {companyId=",expectedType=PREFIX),
              level="WARN",
              loggerClass=BaseStore.class)
public void testLogFailedDeletion()

testLogFailedDeletionWithVersionLabel

@ExpectedLogs(expectedLogs=@ExpectedLog(expectedLog="Unable to delete file {companyId=",expectedType=PREFIX),
              level="WARN",
              loggerClass=BaseStore.class)
public void testLogFailedDeletionWithVersionLabel()

testUpdateFileVersion

public void testUpdateFileVersion()
                           throws Exception
Throws:
Exception

testUpdateFileVersionDuplicateFileException

public void testUpdateFileVersionDuplicateFileException()
                                                 throws Exception
Throws:
Exception

testUpdateFileVersionNoSuchFileException

public void testUpdateFileVersionNoSuchFileException()
                                              throws Exception
Throws:
Exception

testUpdateFileVersionWithNewFileName

public void testUpdateFileVersionWithNewFileName()
                                          throws Exception
Throws:
Exception

testUpdateFileWithByteArray

public void testUpdateFileWithByteArray()
                                 throws Exception
Throws:
Exception

testUpdateFileWithFile

public void testUpdateFileWithFile()
                            throws Exception
Throws:
Exception

testUpdateFileWithInputStream

public void testUpdateFileWithInputStream()
                                   throws Exception
Throws:
Exception

testUpdateFileWithNewFileName

public void testUpdateFileWithNewFileName()
                                   throws Exception
Throws:
Exception

testUpdateFileWithNewFileNameDuplicateFileException

public void testUpdateFileWithNewFileNameDuplicateFileException()
                                                         throws Exception
Throws:
Exception

testUpdateFileWithNewFileNameNoSuchFileException

public void testUpdateFileWithNewFileNameNoSuchFileException()
                                                      throws Exception
Throws:
Exception

testUpdateFileWithNewRepositoryId

public void testUpdateFileWithNewRepositoryId()
                                       throws Exception
Throws:
Exception

testUpdateFileWithNewRepositoryIdDuplicateFileException

public void testUpdateFileWithNewRepositoryIdDuplicateFileException()
                                                             throws Exception
Throws:
Exception

testUpdateFileWithNewRepositoryIdNoSuchFileException

public void testUpdateFileWithNewRepositoryIdNoSuchFileException()
                                                          throws Exception
Throws:
Exception

addVersions

protected void addVersions(String fileName,
                           int newVersionCount)
                    throws Exception
Throws:
Exception

createFile

protected File createFile(byte[] fileData)
                   throws IOException
Throws:
IOException

getStoreType

protected abstract String getStoreType()

Liferay 7.0-ce-b4