Package org.apache.abdera.model

Examples of org.apache.abdera.model.Entry


   public static void testSection4274LinkHreflangInvalidLanguage() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.2.7.4/link-hreflang-invalid-language.xml
     IRI uri = baseURI.resolve("4.2.7.4/link-hreflang-invalid-language.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     Link link = entry.getAlternateLink();
     assertEquals(link.getHrefLang(), "insert language here");
   }
View Full Code Here


   public static void testSection4275LinkTitleWithBadchars() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.2.7.5/link-title-with-badchars.xml
     IRI uri = baseURI.resolve("4.2.7.5/link-title-with-badchars.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     Link link = entry.getAlternateLink();
     assertEquals(link.getTitle(),"This is a \u00A3\u0093test.\u0094");
   }
View Full Code Here

   public static void testSection4275LinkTitleWithHtml() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.2.7.5/link-title-with-html.xml
     IRI uri = baseURI.resolve("4.2.7.5/link-title-with-html.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     Link link = entry.getAlternateLink();
     assertEquals(link.getTitle(),"very, <b>very</b>, scary indeed");
   }
View Full Code Here

   public static void testSection4276LinkLengthNotPositive() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.2.7.6/link-length-not-positive.xml
     IRI uri = baseURI.resolve("4.2.7.6/link-length-not-positive.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     Link link = entry.getAlternateLink();
     assertEquals(link.getLength(),0);
   }
View Full Code Here

   public static void testSection4211MissingId() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.2.11/missing-id.xml
     IRI uri = baseURI.resolve("4.2.11/missing-id.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     Source source = entry.getSource();
     assertNull(source.getId());
   }
View Full Code Here

   public static void testSection4211MissingTitle() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.2.11/missing-title.xml
     IRI uri = baseURI.resolve("4.2.11/missing-title.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     Source source = entry.getSource();
     assertNull(source.getTitle());
   }
View Full Code Here

   public static void testSection4211MissingUpdated() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.2.11/missing-updated.xml
     IRI uri = baseURI.resolve("4.2.11/missing-updated.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     Source source = entry.getSource();
     assertNull(source.getUpdated());
   }
View Full Code Here

   public static void testSection4211MultipleAlternatesDiffering() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.2.11/multiple-alternates-differing.xml
     IRI uri = baseURI.resolve("4.2.11/multiple-alternates-differing.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     Source source = entry.getSource();
     List<Link> links = source.getLinks("alternate");
     assertEquals(links.size(),2);
     assertEquals(links.get(0).getResolvedHref(), new IRI("http://example.org/"));
     assertEquals(links.get(1).getResolvedHref(), new IRI("http://example.es/"));
   }
View Full Code Here

   public static void testSection4211MultipleAlternatesMatching() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.2.11/multiple-alternates-matching.xml
     IRI uri = baseURI.resolve("4.2.11/multiple-alternates-matching.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     Source source = entry.getSource();
     assertEquals(source.getAlternateLink().getResolvedHref(), new IRI("http://example.org/front-page.html"));
   }  
View Full Code Here

   public static void testSection4211MultipleGenerators() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.2.11/multiple-generators.xml
     IRI uri = baseURI.resolve("4.2.11/multiple-generators.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     Generator g = entry.getSource().getGenerator();
     assertEquals(g.getResolvedUri(), new IRI("http://www.example.com/"));
   }
View Full Code Here

TOP

Related Classes of org.apache.abdera.model.Entry

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.