MCPcopy Create free account
hub / github.com/commoncrawl/cc-index-table / testURL

Method testURL

src/test/java/org/commoncrawl/net/TestURL.java:78–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

76 }
77
78 @Test
79 void testURL() {
80 WarcUri u = new WarcUri(exampleUrl);
81 assertNotNull(u);
82 assertEquals(u.getHostName().getHostName(), exampleHost);
83 assertEquals(u.getProtocol(), "http");
84 assertNull(u.getPort()); // no port given
85 assertEquals(u.getPath(), "/path/q");
86 assertEquals(u.getQuery(), "a=b&c=d");
87 }
88
89 @Test
90 void testIPAddress() {

Callers

nothing calls this directly

Calls 6

getHostNameMethod · 0.95
getProtocolMethod · 0.95
getPortMethod · 0.95
getPathMethod · 0.95
getQueryMethod · 0.95
getHostNameMethod · 0.45

Tested by

no test coverage detected