TreeSPath path1 = new TreeSPath("/test");\r
TreeSPath path2 = new TreeSPath("/test");\r
assertEquals(path1, path2);\r
- \r
+\r
path1 = new TreeSPath("/test/subdir/anotherdir");\r
path2 = new TreeSPath("/test/subdir/anotherdir");\r
assertEquals(path1, path2);\r
- \r
+\r
path1 = new TreeSPath("/test/subdir/anotherd");\r
path2 = new TreeSPath("/test/subdir/anotherdir");\r
assertNotSame(path1, path2);\r
- \r
+\r
path1 = new TreeSPath("/test/subdir");\r
path2 = new TreeSPath("/test/subdir/anotherdir");\r
assertNotSame(path1, path2);\r
- \r
+\r
path1 = new TreeSPath("/test/subd/anotherdir");\r
path2 = new TreeSPath("/test/subdir/anotherdir");\r
assertNotSame(path1, path2);\r
}\r
- \r
- public void testCheckFormat(){\r
- try{\r
+\r
+ public void testCheckFormat() {\r
+ try {\r
new TreeSPath("hello");\r
fail("Bad format should be rejected");\r
- }catch(Exception e){\r
+ } catch (Exception e) {\r
// exception expected\r
}\r
- \r
- try{\r
+\r
+ try {\r
new TreeSPath("/");\r
fail("Bad format should be rejected");\r
- }catch(Exception e){\r
+ } catch (Exception e) {\r
// exception expected\r
}\r
- \r
+\r
assertEquals(new TreeSPath("/test"), new TreeSPath("/test/"));\r
- assertEquals(new TreeSPath("/test/dir"), new TreeSPath("//test///dir////"));\r
+ assertEquals(new TreeSPath("/test/dir"), new TreeSPath(\r
+ "//test///dir////"));\r
}\r
}\r