* Path for tree based <code>StructureRegistry</code> implementations.\r
*/\r
public class TreeSPath implements StructurePath, Comparable<StructurePath> {\r
- /** Default character to use a separator: #. */\r
- public static Character DEFAULT_SEPARATOR = '#';\r
+ /** Default character to use a separator: /. */\r
+ public static Character DEFAULT_SEPARATOR = '/';\r
\r
private TreeSPath parent;\r
private String name;\r
path.name = name;\r
return path;\r
}\r
+ /** Parses a string to a path. */\r
+ public static TreeSPath parseToCreatePath(String path) {\r
+ return parseToCreatePath(path, DEFAULT_SEPARATOR);\r
+ }\r
\r
/** Parses a string to a path. */\r
public static TreeSPath parseToCreatePath(String path, Character separator) {\r
// assertPart(testResult1, "", 0, TestStatus.PASSED, "");\r
assertPart(\r
testResult1,\r
- "#root#Category1#SubCategory2#testComplex#slc.test0#0",\r
+ "/root/Category1/SubCategory2/testComplex/slc.test0/0",\r
0,\r
TestStatus.PASSED,\r
- "Sub task with path #root#Category1#SubCategory2#testComplex#slc.test0#0 executed");\r
+ "Sub task with path /root/Category1/SubCategory2/testComplex/slc.test0/0 executed");\r
assertPart(testResult1,\r
- "#root#Category1#SubCategory2#testSimple#slc.test0", 1,\r
+ "/root/Category1/SubCategory2/testSimple/slc.test0", 1,\r
TestStatus.FAILED,\r
"Compare nato-expected.txt with nato-reached.txt");\r
\r
TreeTestResult testResult2 = (TreeTestResult) testResultDao\r
.getTestResult(numericTRId);\r
assertPart(testResult2,\r
- "#root#Category1#SubCategory2#testSimple#slc.test2", 1,\r
+ "/root/Category1/SubCategory2/testSimple/slc.test2", 1,\r
TestStatus.PASSED,\r
"Compare eu-reform-expected.txt with eu-reform-reached.txt");\r
assertPart(testResult2,\r
- "#root#Category1#SubCategory2#testSimple#slc.test3", 1,\r
+ "/root/Category1/SubCategory2/testSimple/slc.test3", 1,\r
TestStatus.FAILED,\r
"Compare eu-reform-expected.txt with eu-reform-reached.txt");\r
\r
\r
private void assertPart(TreeTestResult testResult, String pathStr,\r
int index, Integer status, String message) {\r
- TreeSPath path = TreeSPath.parseToCreatePath(pathStr, '#');\r
+ TreeSPath path = TreeSPath.parseToCreatePath(pathStr);\r
PartSubList list = testResult.getResultParts().get(path);\r
SimpleResultPart part = (SimpleResultPart) list.getParts().get(index);\r
assertEquals(status, part.getStatus());\r
TreeSPathDao treeSPathDao = (TreeSPathDao) getContext().getBean(\r
"treeSPathDao");\r
\r
- String pathParentStr = "#root#testParent";\r
- String pathStr = pathParentStr+"#test";\r
- TreeSPath path = TreeSPath.parseToCreatePath(pathStr, '#');\r
+ String pathParentStr = "/root/testParent";\r
+ String pathStr = pathParentStr+"/test";\r
+ TreeSPath path = TreeSPath.parseToCreatePath(pathStr);\r
treeSPathDao.create(path);\r
\r
TreeSPath pathChild = treeSPathDao.getTreeSPath(pathStr);\r
TestResultDao testResultDao = (TestResultDao) getContext().getBean(\r
"testResultDao");\r
\r
- String pathParentStr = "#root#testParent";\r
- String pathStr = pathParentStr + "#test";\r
- TreeSPath path = TreeSPath.parseToCreatePath(pathStr, '#');\r
+ String pathParentStr = "/root/testParent";\r
+ String pathStr = pathParentStr + "/test";\r
+ TreeSPath path = TreeSPath.parseToCreatePath(pathStr);\r
treeSPathDao.create(path);\r
\r
TreeTestResult treeTestResult = new TreeTestResult();\r