"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "httpclient/src/test/java/org/apache/http/conn/util/TestPublicSuffixMatcher.java" between
httpcomponents-client-4.5.9-src.tar.gz and httpcomponents-client-4.5.10-src.tar.gz

About: HttpComponents is an Apache project responsible for creating and maintaining a toolset of low level Java components focused on HTTP and associated protocols. Java sources.

TestPublicSuffixMatcher.java  (httpcomponents-client-4.5.9-src):TestPublicSuffixMatcher.java  (httpcomponents-client-4.5.10-src)
skipping to change at line 72 skipping to change at line 72
Assert.assertEquals("example.xx", matcher.getDomainRoot("www.example.XX" )); Assert.assertEquals("example.xx", matcher.getDomainRoot("www.example.XX" ));
Assert.assertEquals("example.xx", matcher.getDomainRoot("www.blah.blah.e xample.XX")); Assert.assertEquals("example.xx", matcher.getDomainRoot("www.blah.blah.e xample.XX"));
Assert.assertEquals(null, matcher.getDomainRoot("xx")); Assert.assertEquals(null, matcher.getDomainRoot("xx"));
Assert.assertEquals(null, matcher.getDomainRoot("jp")); Assert.assertEquals(null, matcher.getDomainRoot("jp"));
Assert.assertEquals(null, matcher.getDomainRoot("ac.jp")); Assert.assertEquals(null, matcher.getDomainRoot("ac.jp"));
Assert.assertEquals(null, matcher.getDomainRoot("any.tokyo.jp")); Assert.assertEquals(null, matcher.getDomainRoot("any.tokyo.jp"));
Assert.assertEquals("metro.tokyo.jp", matcher.getDomainRoot("metro.tokyo .jp")); Assert.assertEquals("metro.tokyo.jp", matcher.getDomainRoot("metro.tokyo .jp"));
Assert.assertEquals("blah.blah.tokyo.jp", matcher.getDomainRoot("blah.bl ah.tokyo.jp")); Assert.assertEquals("blah.blah.tokyo.jp", matcher.getDomainRoot("blah.bl ah.tokyo.jp"));
Assert.assertEquals("blah.ac.jp", matcher.getDomainRoot("blah.blah.ac.jp ")); Assert.assertEquals("blah.ac.jp", matcher.getDomainRoot("blah.blah.ac.jp "));
Assert.assertEquals("garbage", matcher.getDomainRoot("garbage")); Assert.assertEquals("garbage", matcher.getDomainRoot("garbage"));
Assert.assertEquals("garbage.garbage", matcher.getDomainRoot("garbage.ga Assert.assertEquals("garbage", matcher.getDomainRoot("garbage.garbage"))
rbage")); ;
Assert.assertEquals("garbage", matcher.getDomainRoot("*.garbage.garbage"
));
Assert.assertEquals("garbage", matcher.getDomainRoot("*.garbage.garbage.
garbage"));
} }
@Test @Test
public void testMatch() throws Exception { public void testMatch() throws Exception {
Assert.assertTrue(matcher.matches(".jp")); Assert.assertTrue(matcher.matches(".jp"));
Assert.assertTrue(matcher.matches(".ac.jp")); Assert.assertTrue(matcher.matches(".ac.jp"));
Assert.assertTrue(matcher.matches(".any.tokyo.jp")); Assert.assertTrue(matcher.matches(".any.tokyo.jp"));
// exception // exception
Assert.assertFalse(matcher.matches(".metro.tokyo.jp")); Assert.assertFalse(matcher.matches(".metro.tokyo.jp"));
} }
 End of changes. 1 change blocks. 
2 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)