Package org.apache.abdera.model

Examples of org.apache.abdera.model.Entry


   public static void testSection4133ContentXhtmlTextChildren() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.1.3.3/content-xhtml-text-children.xml
     IRI uri = baseURI.resolve("4.1.3.3/content-xhtml-text-children.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     assertEquals(entry.getContentType(), Content.Type.XHTML);
     assertNull(entry.getContent());
   }
View Full Code Here


   public static void testSection4221CategoryNoTerm() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.2.2.1/category-no-term.xml
     IRI uri = baseURI.resolve("4.2.2.1/category-no-term.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     List<Category> cats = entry.getCategories();
     assertEquals(cats.size(),1);
     assertNull(cats.get(0).getTerm());
   }
View Full Code Here

   public static void testSection4222CategoryNoScheme() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.2.2.2/category-no-scheme.xml
     IRI uri = baseURI.resolve("4.2.2.2/category-no-scheme.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     List<Category> cats = entry.getCategories();
     assertEquals(cats.size(),1);
     assertNull(cats.get(0).getScheme());
   }
View Full Code Here

   public static void testSection4222CategorySchemeRelIri() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.2.2.2/category-scheme-rel-iri.xml
     IRI uri = baseURI.resolve("4.2.2.2/category-scheme-rel-iri.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     Category cat = entry.getCategories().get(0);
     assertEquals(cat.getScheme(), new IRI("mine"));
   }
View Full Code Here

   public static void testSection4223CategoryLabelEscapedHtml() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.2.2.3/category-label-escaped-html.xml
     IRI uri = baseURI.resolve("4.2.2.3/category-label-escaped-html.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     Category cat = entry.getCategories().get(0);
     assertEquals(cat.getLabel(), "<b>business</b>");
   }
View Full Code Here

   public static void testSection4223CategoryNoLabel() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.2.2.3/category-no-label.xml
     IRI uri = baseURI.resolve("4.2.2.3/category-no-label.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     Category cat = entry.getCategories().get(0);
     assertNull(cat.getLabel());
   }
View Full Code Here

   public static void testSection427LinkNoHref() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.2.7.1/link-no-href.xml
     IRI uri = baseURI.resolve("4.2.7.1/link-no-href.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     Link link = entry.getLinks().get(0);
     assertNull(link.getHref());
   }
View Full Code Here

   public static void testSection4272LinkRelIsegmentNzNc() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.2.7.2/link-rel-isegment-nz-nc.xml
     IRI uri = baseURI.resolve("4.2.7.2/link-rel-isegment-nz-nc.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     assertNotNull(entry.getAlternateLink());
   }
View Full Code Here

   public static void testSection4272LinkRelRelative() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.2.7.2/link-rel-relative.xml
     IRI uri = baseURI.resolve("4.2.7.2/link-rel-relative.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     Link link = entry.getLink("/foo");
     assertNotNull(link)// we don't care that it's invalid
   }
View Full Code Here

   public static void testSection4272SelfVsAlternate() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.2.7.2/self-vs-alternate.xml
     IRI uri = baseURI.resolve("4.2.7.2/self-vs-alternate.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     assertNull(entry.getAlternateLink());
     Link self = entry.getLink("self");
     assertEquals(self.getMimeType().toString(), "text/html");
   }
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.