|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.alfresco.filesys.repo.ContentDiskDriverTest
public class ContentDiskDriverTest
Unit tests for Alfresco Repository ContentDiskDriver
Nested Class Summary | |
---|---|
class |
ContentDiskDriverTest.TestServer
Test server |
Constructor Summary | |
---|---|
ContentDiskDriverTest()
|
Method Summary | |
---|---|
void |
DISABLED_testScenarioEmacsSave()
This test tries to simulate the cifs shuffling that is done to support EMACS a) emacsTest.txt b) Rename original file to emacsTest.txt~ c) Create emacsTest.txt |
void |
DISABLED_testScenarioSmultronSave()
This test tries to simulate the cifs shuffling that is done to support smultron a) smultronTest.txt b) Save new file to .dat04cd.004 c) Delete smultronTest.txt c) Rename .dat04cd.004 to smultronTest.txt |
protected void |
setUp()
|
protected void |
tearDown()
|
void |
testCreateFile()
Test Create File |
void |
testDeleteFile()
Unit test of delete file |
void |
testDirListing()
|
void |
testFileExists()
Unit test of file exists |
void |
testFileInformationUpdatingByEditorUserForAlf8808()
|
void |
testMetadataExtraction()
This test tries to simulate the shuffling that is done by MS Word 2003 with regard to metadata extraction. |
void |
testOpenCloseVersionableFile()
Unit test of open read/write close versionable file - should not do anything. |
void |
testOpenFile()
Test Open File |
void |
testRenameFile()
Unit test of rename file |
void |
testScenarioDeleteViaNodeService()
This time we create a file through the ContentDiskDriver and then delete it through the repo. |
void |
testScenarioFrameMakerShuffle()
Frame maker save a) Lock File Created (X.fm.lck) b) Create new file (X.fm.C29) c) Existing file rename out of the way. |
void |
testScenarioMSWord2003SaveAsShuffle()
Simulates a SaveAs from Word2003 1. |
void |
testScenarioMSWord2003SaveAsShuffleCheckedOutFile()
Simulates a SaveAs from Word2003 for a checked out file 1. |
void |
testScenarioMSWord2003SaveShuffle()
This test tries to simulate the shuffling that is done by MS Word 2003 upon file save a) TEST.DOC b) Save to ~WRDnnnn.TMP c) Delete ~WRLnnnn.TMP d) Rename TEST.DOC ~WDLnnnn.TMP e) Delete TEST.DOC f) Rename ~WRDnnnn.TMP to TEST.DOC g) Delete ~WRLnnnn.TMP We need to check that properties, aspects, primary assocs, secondary assocs, peer assocs, node type, version history, creation date are maintained. |
void |
testScenarioMSWord2003SaveShuffleWithBackup()
This test tries to simulate the shuffling that is done by MS Word 2003 with backup enabled upon file save a) TEST.DOC b) Save to ~WRDnnnn.TMP c) Delete "Backup of TEST.DOC" d) Rename TEST.DOC to "Backup of TEST.DOC" e) Delete TEST.DOC f) Rename ~WRDnnnn.TMP to TEST.DOC We need to check that properties, aspects, primary assocs, secondary assocs, peer assocs, node type, version history, creation date are maintained. |
void |
testScenarioMSWord2007Save()
This test tries to simulate the cifs shuffling that is done to support MS Word 2007 a) TEST.DOCX b) Save new to 00000001.TMP c) Rename TEST.DOCX to 00000002.TMP d) Rename 000000001.TMP to TEST.DOCX e) Delete 000000002.TMP |
void |
testScenarioOpenCloseFile()
Test Open Close File Scenario 1) open(readOnly) 2) open(readWrite) 3) open(readWrite) - does nothing. |
void |
testScenarioRenameVersionableFile()
Unit test of rename versionable file |
void |
testScenarioViSave()
This test tries to simulate the cifs shuffling that is done to support vi a) viTest.txt b) Rename original file to viTest.txt~ c) Create viTest.txt d) Delete viTest.txt~ |
void |
testSetFileInfo()
Test Set Info Three flags set SetDeleteOnClose SetCreationDate SetModifyDate |
void |
testZeroByteRules()
|
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ContentDiskDriverTest()
Method Detail |
---|
protected void setUp() throws java.lang.Exception
setUp
in class junit.framework.TestCase
java.lang.Exception
protected void tearDown() throws java.lang.Exception
tearDown
in class junit.framework.TestCase
java.lang.Exception
public void testCreateFile() throws java.lang.Exception
java.lang.Exception
public void testDeleteFile() throws java.lang.Exception
java.lang.Exception
public void testSetFileInfo() throws java.lang.Exception
java.lang.Exception
public void testOpenFile() throws java.lang.Exception
java.lang.Exception
public void testFileExists() throws java.lang.Exception
java.lang.Exception
public void testRenameFile() throws java.lang.Exception
java.lang.Exception
public void testScenarioRenameVersionableFile() throws java.lang.Exception
java.lang.Exception
public void testScenarioMSWord2003SaveShuffle() throws java.lang.Exception
java.lang.Exception
public void testScenarioMSWord2003SaveShuffleWithBackup() throws java.lang.Exception
java.lang.Exception
public void testScenarioMSWord2007Save() throws java.lang.Exception
java.lang.Exception
public void DISABLED_testScenarioEmacsSave() throws java.lang.Exception
java.lang.Exception
public void testScenarioViSave() throws java.lang.Exception
java.lang.Exception
public void DISABLED_testScenarioSmultronSave() throws java.lang.Exception
java.lang.Exception
public void testScenarioDeleteViaNodeService() throws java.lang.Exception
java.lang.Exception
public void testMetadataExtraction() throws java.lang.Exception
1: Setup an inbound rule for ContentMetadataExtractor. 2: Write ContentDiskDriverTest1 file to ContentDiskDriver.docx 3: Check metadata extraction for non update test Simulate a WORD 2003 CIFS shuffle 4: Write ContentDiskDriverTest2 file to ~WRD0003.TMP 5: Rename ContentDiskDriver.docx to ~WRL0003.TMP 6: Rename ~WRD0003.TMP to ContentDiskDriver.docx 7: Check metadata extraction
java.lang.Exception
public void testDirListing() throws java.lang.Exception
java.lang.Exception
public void testFileInformationUpdatingByEditorUserForAlf8808() throws java.lang.Exception
java.lang.Exception
public void testScenarioMSWord2003SaveAsShuffle() throws java.lang.Exception
java.lang.Exception
public void testScenarioOpenCloseFile() throws java.lang.Exception
java.lang.Exception
public void testOpenCloseVersionableFile() throws java.lang.Exception
This is done with a CIFS shuffle from word. Basically Word holds the file open with a read/write lock while the shuffle is going on.
Create a file. Apply versionable aspect Open the file ReadWrite + OpLocks Close the file Check Version has not incremented.
java.lang.Exception
public void testScenarioFrameMakerShuffle() throws java.lang.Exception
java.lang.Exception
public void testZeroByteRules() throws java.lang.Exception
java.lang.Exception
public void testScenarioMSWord2003SaveAsShuffleCheckedOutFile() throws java.lang.Exception
java.lang.Exception
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |