+
+ @Test(groups = "Functional")
+ public void testPathEquals()
+ {
+ assertTrue(Platform.pathEquals(null, null));
+ assertFalse(Platform.pathEquals(null, "apath"));
+ assertFalse(Platform.pathEquals("apath", null));
+ assertFalse(Platform.pathEquals("apath", "APATH"));
+ assertTrue(Platform.pathEquals("apath", "apath"));
+ assertTrue(Platform.pathEquals("apath/a/b", "apath\\a\\b"));
+ }
+
+ @Test(groups = "Functional")
+ public void testEscapeBackslashes()
+ {
+ assertNull(Platform.escapeBackslashes(null));
+ assertEquals(Platform.escapeBackslashes("hello world"), "hello world");
+ assertEquals(Platform.escapeBackslashes("hello\\world"),
+ "hello\\\\world");
+ }
+
+ @Test(groups = { "Functional" })
+ public void getLeadingIntegerFromString()
+ {
+ Assert.assertEquals(Platform.getLeadingIntegerValue("1234abcd", -1),
+ 1234);
+ Assert.assertEquals(Platform.getLeadingIntegerValue("1234", -1), 1234);
+ Assert.assertEquals(Platform.getLeadingIntegerValue("abcd", -1), -1);
+ Assert.assertEquals(Platform.getLeadingIntegerValue("abcd1234", -1),
+ -1);
+ Assert.assertEquals(Platform.getLeadingIntegerValue("None", -1), -1);
+ Assert.assertEquals(Platform.getLeadingIntegerValue("Null", -1), -1);
+ }