public class ContentDiskDriverTest
extends junit.framework.TestCase
| Modifier and Type | Class and Description |
|---|---|
class |
ContentDiskDriverTest.TestServer
Test server
|
| Constructor and Description |
|---|
ContentDiskDriverTest() |
| Modifier and Type | Method and Description |
|---|---|
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 |
testEmptyContent()
Test that files can be created with empty content and that
existing content can be over-wrriten by empty content.
|
void |
testExcel2003SaveShuffle()
Excel 2003 With Versionable file
CreateFile 5EE27100
RenameFile oldPath:\Espaces Utilisateurs\System\Cherries.xls,
newPath:\Espaces Utilisateurs\System\Cherries.xls~RF172f241.TMP
RenameFile oldName=\Espaces Utilisateurs\System\5EE27100,
newName=\Espaces Utilisateurs\System\Cherries.xls, session:WNB0
Set Delete On Close for Cherries.xls~RF172f241.TMP
|
void |
testFileExists()
Unit test of file exists
|
void |
testFileInformationUpdatingByEditorUserForAlf8808() |
void |
testGetFileInformation()
Test Get File Information
|
void |
testMetadataExtraction()
This test tries to simulate the shuffling that is done by MS Word 2003
with regard to metadata extraction.
|
void |
testMetadataExtractionForMac()
ALF-12812
This test tries to simulate the shuffling that is done by MS Word 2011 for Mac
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 |
testScenarioMacLionTextEdit()
This test tries to simulate the cifs shuffling that is done
from Save from Mac Lion by TextEdit
a) Temp file created in temporary folder (test.txt)
b) Resource fork file created in temporary folder (._test.txt)
b) Target file deleted
c) Temp file moved to target file.
|
void |
testScenarioMSPowerpoint2011MacSaveShuffle()
Simulates a Save from Powerpoint 2011 Mac
0.
|
void |
testScenarioMSWord20011MacSaveWithBackup()
This test tries to simulate the cifs shuffling that is done to
support MS Word 2011 on Mac with backup turned on.
|
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 |
testScenarioOpenCloseFileTwo()
Test Open Close File Scenario II ALF-13401
Open Read Only of a file already open for read/write.
|
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 |
testSetFileScenario()
ALF-10686
This scenario is executed by windows explorer.
|
void |
testZeroByteRules()
Test that rules fire on zero byte long files.
|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, toStringassertEquals, 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, formatprotected void setUp()
throws java.lang.Exception
setUp in class junit.framework.TestCasejava.lang.Exceptionprotected void tearDown()
throws java.lang.Exception
tearDown in class junit.framework.TestCasejava.lang.Exceptionpublic void testGetFileInformation()
throws java.lang.Exception
java.lang.Exceptionpublic void testCreateFile()
throws java.lang.Exception
java.lang.Exceptionpublic void testDeleteFile()
throws java.lang.Exception
java.lang.Exceptionpublic void testSetFileInfo()
throws java.lang.Exception
java.lang.Exceptionpublic void testOpenFile()
throws java.lang.Exception
java.lang.Exceptionpublic void testFileExists()
throws java.lang.Exception
java.lang.Exceptionpublic void testRenameFile()
throws java.lang.Exception
java.lang.Exceptionpublic void testScenarioRenameVersionableFile()
throws java.lang.Exception
java.lang.Exceptionpublic void testScenarioMSWord2003SaveShuffle()
throws java.lang.Exception
java.lang.Exceptionpublic void testScenarioMSWord2003SaveShuffleWithBackup()
throws java.lang.Exception
java.lang.Exceptionpublic void testScenarioMSWord2007Save()
throws java.lang.Exception
java.lang.Exceptionpublic void DISABLED_testScenarioEmacsSave()
throws java.lang.Exception
java.lang.Exceptionpublic void testScenarioViSave()
throws java.lang.Exception
java.lang.Exceptionpublic void DISABLED_testScenarioSmultronSave()
throws java.lang.Exception
java.lang.Exceptionpublic void testScenarioDeleteViaNodeService()
throws java.lang.Exception
java.lang.Exceptionpublic 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.Exceptionpublic void testMetadataExtractionForMac()
throws java.lang.Exception
1: Setup an update rule for ContentMetadataExtractor. Simulate a WORD 2011 for Mac Create 2: Write "Word Work File D_1725484373.tmp" 3: Close file 4: Rename "Word Work File D_1725484373.tmp" to ContentDiskDriver.docx 5: Check metadata extraction
java.lang.Exceptionpublic void testDirListing()
throws java.lang.Exception
java.lang.Exceptionpublic void testFileInformationUpdatingByEditorUserForAlf8808()
throws java.lang.Exception
java.lang.Exceptionpublic void testExcel2003SaveShuffle()
throws java.lang.Exception
java.lang.Exceptionpublic void testScenarioMSWord2003SaveAsShuffle()
throws java.lang.Exception
java.lang.Exceptionpublic void testScenarioOpenCloseFile()
throws java.lang.Exception
java.lang.Exceptionpublic void testScenarioOpenCloseFileTwo()
throws java.lang.Exception
java.lang.Exceptionpublic 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.Exceptionpublic void testScenarioFrameMakerShuffle()
throws java.lang.Exception
java.lang.Exceptionpublic void testZeroByteRules()
throws java.lang.Exception
java.lang.Exceptionpublic void testEmptyContent()
throws java.lang.Exception
java.lang.Exceptionpublic void testScenarioMSWord2003SaveAsShuffleCheckedOutFile()
throws java.lang.Exception
java.lang.Exceptionpublic void testSetFileScenario()
throws java.lang.Exception
java.lang.Exceptionpublic void testScenarioMacLionTextEdit()
throws java.lang.Exception
java.lang.Exceptionpublic void testScenarioMSPowerpoint2011MacSaveShuffle()
throws java.lang.Exception
java.lang.Exceptionpublic void testScenarioMSWord20011MacSaveWithBackup()
throws java.lang.Exception
java.lang.ExceptionCopyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.