Assert.assertTrue(result);
}
/**
* 验证URL地址
*/
@Test
public void testCheckURL() {
boolean result = RegexUtils.checkURL("http://blog.csdn.com:80/xyang81/article/details name=&abc=中文");
Assert.assertTrue(result);
}
* 验证IP地址
*/
@Test
public void testCheckIpAddress() {
boolean result = RegexUtils.checkIpAddress("192.1.22.255");
Assert.assertTrue(result);
}
}
测试结果: