Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.7
-
Don't Know (Unsure) - The default level
Description
This step fixes unit tests for the file manager's 'system' package. Two classes were updated: TestXmlRpcFileManager and TestXmlRpcFileManagerClient.
For each class, hard-coded paths to test resources were replaced with paths from URLs via the 'getResource()' method. Additionally, java.util.Properties objects were used to set System properties and then restore initial settings after each test method runs (in setUp and tearDown methods).
The following Maven command was used to run each test class from the top-level (trunk) directory:
mvn clean -Dtest=<test class name> -DfailIfNoTests=false test -pl filemgr -am
Before:
TestXmlRpcFileManager Results : Tests run: 1, Failures: 1, Errors: 0, Skipped: 0 TestXmlRpcFileManagerClient Results : Tests run: 4, Failures: 4, Errors: 0, Skipped: 0
After:
TestXmlRpcFileManager Results : Tests run: 1, Failures: 0, Errors: 0, Skipped: 0 TestXmlRpcFileManagerClient Results : Tests run: 4, Failures: 0, Errors: 0, Skipped: 0
5 tests were fixed in total.