org.silverpeas.process.io.file
Class AbstractHandledFileTest
java.lang.Object
org.silverpeas.process.io.file.AbstractHandledFileTest
- Direct Known Subclasses:
- FileHandlerTest, HandledFileTest
public abstract class AbstractHandledFileTest
- extends Object
- Author:
- Yohann Chastagnier
|
Method Summary |
void |
afterTest()
|
protected void |
assertFileNames(File test,
File expected)
Centralizes asserts |
protected void |
assertSizes(long sessionSize,
long realSize)
Centralizes common code |
void |
beforeTest()
|
protected void |
buildCommonPathStructure()
--> SESSION
/sessionPath/handledPath/root_file_2
/sessionPath/handledPath/root_file_3
/sessionPath/handledPath/componentInstanceId/file_1
/sessionPath/handledPath/componentInstanceId/a/b/file_ab_1
/sessionPath/handledPath/componentInstanceId/a/b/file_ab_2.xml
/sessionPath/handledPath/componentInstanceId/a/b/c/file_abc_3
/sessionPath/handledPath/componentInstanceId/b/file_b_2
--> REAL
/root_file_1
/root_file_2
/componentInstanceId/file_1
/componentInstanceId/file_2
/componentInstanceId/a/file_a_1
/componentInstanceId/a/file_a_2 -
/componentInstanceId/a/file_a_3.xml
/componentInstanceId/a/b/file_ab_1 -
/componentInstanceId/a/b/file_ab_2.xml -
/componentInstanceId/a/b/c/file_abc_1 -
/componentInstanceId/a/b/c/file_abc_2 -
/componentInstanceId/b/file_b_1
/componentInstanceId/b/c/file_bc_1.test
/componentInstanceId/b/c/d/file_bcd_1 -
--> DELETED
/componentInstanceId/a/file_a_2
/componentInstanceId/a/b/
/componentInstanceId/b/c/d/ |
protected static ProcessSession |
createSessionTest()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BASE_PATH_TEST
protected static final FileBasePath BASE_PATH_TEST
currentSession
protected static final ProcessSession currentSession
componentInstanceId
protected static final String componentInstanceId
- See Also:
- Constant Field Values
sessionRootPath
protected static final File sessionRootPath
realRootPath
protected static final File realRootPath
otherFile
protected static final File otherFile
sessionHandledPath
protected static final File sessionHandledPath
realComponentPath
protected static final File realComponentPath
sessionComponentPath
protected static final File sessionComponentPath
fileHandler
protected FileHandler fileHandler
AbstractHandledFileTest
public AbstractHandledFileTest()
beforeTest
public void beforeTest()
throws Exception
- Throws:
Exception
afterTest
public void afterTest()
throws Exception
- Throws:
Exception
buildCommonPathStructure
protected void buildCommonPathStructure()
throws Exception
- --> SESSION
/sessionPath/handledPath/root_file_2
/sessionPath/handledPath/root_file_3
/sessionPath/handledPath/componentInstanceId/file_1
/sessionPath/handledPath/componentInstanceId/a/b/file_ab_1
/sessionPath/handledPath/componentInstanceId/a/b/file_ab_2.xml
/sessionPath/handledPath/componentInstanceId/a/b/c/file_abc_3
/sessionPath/handledPath/componentInstanceId/b/file_b_2
--> REAL
/root_file_1
/root_file_2
/componentInstanceId/file_1
/componentInstanceId/file_2
/componentInstanceId/a/file_a_1
/componentInstanceId/a/file_a_2 -
/componentInstanceId/a/file_a_3.xml
/componentInstanceId/a/b/file_ab_1 -
/componentInstanceId/a/b/file_ab_2.xml -
/componentInstanceId/a/b/c/file_abc_1 -
/componentInstanceId/a/b/c/file_abc_2 -
/componentInstanceId/b/file_b_1
/componentInstanceId/b/c/file_bc_1.test
/componentInstanceId/b/c/d/file_bcd_1 -
--> DELETED
/componentInstanceId/a/file_a_2
/componentInstanceId/a/b/
/componentInstanceId/b/c/d/
- Throws:
Exception
assertSizes
protected void assertSizes(long sessionSize,
long realSize)
- Centralizes common code
- Parameters:
sessionSize - realSize -
assertFileNames
protected void assertFileNames(File test,
File expected)
- Centralizes asserts
- Parameters:
test - expected -
createSessionTest
protected static ProcessSession createSessionTest()
Copyright © 2016 Silverpeas. All Rights Reserved.