[fixed] More help when configuring new slaves (issue #1530)

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@8991 71c3de6d-444a-0410-be80-ed276b4c234a
This commit is contained in:
redsolo committed 2008-05-01 08:55:26 +00:00
1 parent ac599e6af7
commit 6317d1e158
6 files changed
+123 -10

No files matched your search

+10
View File
@@ -60,4 +60,14 @@ public class UtilTest extends TestCase {
String encoded = Util.encode(urlWithSpaces);
assertEquals(encoded, "http://hudson/job/Hudson%20Job");
}
/**
* Test the tryParseNumber() method.
*/
public void testTryParseNumber() {
assertEquals("Successful parse did not return the parsed value", 20, Util.tryParseNumber("20", 10).intValue());
assertEquals("Failed parse did not return the default value", 10, Util.tryParseNumber("ss", 10).intValue());
assertEquals("Parsing empty string did not return the default value", 10, Util.tryParseNumber("", 10).intValue());
assertEquals("Parsing null string did not return the default value", 10, Util.tryParseNumber(null, 10).intValue());
}
}