|
|
|
@ -390,6 +390,8 @@ public class GenericXMLParserTest {
|
|
|
|
|
assertEquals(1, documents.length);
|
|
|
|
|
assertFalse(documents[0].isPartiallyParsed());
|
|
|
|
|
|
|
|
|
|
assertTrue(documents[0].getTextString().contains("And this is a relative link"));
|
|
|
|
|
|
|
|
|
|
Collection<AnchorURL> detectedAnchors = documents[0].getAnchors();
|
|
|
|
|
assertNotNull(detectedAnchors);
|
|
|
|
|
assertEquals(5, detectedAnchors.size());
|
|
|
|
@ -410,6 +412,9 @@ public class GenericXMLParserTest {
|
|
|
|
|
assertEquals(1, documents.length);
|
|
|
|
|
assertTrue(documents[0].isPartiallyParsed());
|
|
|
|
|
|
|
|
|
|
assertTrue(documents[0].getTextString().contains("Home page"));
|
|
|
|
|
assertFalse(documents[0].getTextString().contains("And this is a relative link"));
|
|
|
|
|
|
|
|
|
|
Collection<AnchorURL> detectedAnchors = documents[0].getAnchors();
|
|
|
|
|
assertNotNull(detectedAnchors);
|
|
|
|
|
assertEquals(2, detectedAnchors.size());
|
|
|
|
@ -447,6 +452,9 @@ public class GenericXMLParserTest {
|
|
|
|
|
assertEquals(1, documents.length);
|
|
|
|
|
assertTrue(documents[0].isPartiallyParsed());
|
|
|
|
|
|
|
|
|
|
assertTrue(documents[0].getTextString().contains("and this is a mention to a relative URL"));
|
|
|
|
|
assertFalse(documents[0].getTextString().contains("And this is a relative link to another"));
|
|
|
|
|
|
|
|
|
|
Collection<AnchorURL> detectedAnchors = documents[0].getAnchors();
|
|
|
|
|
assertNotNull(detectedAnchors);
|
|
|
|
|
assertEquals(3, detectedAnchors.size());
|
|
|
|
|