Package org.apache.abdera.model

Examples of org.apache.abdera.model.Entry


   public static void testSection4132ContentSrcExtraChild() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.1.3.2/content-src-extra-child.xml
     IRI uri = baseURI.resolve("4.1.3.2/content-src-extra-child.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     Content content = entry.getContentElement();
     assertEquals(content.getResolvedSrc(), new IRI("http://example.org/2003/12/13/atom03"));
     assertEquals(entry.getContent().trim(), "extraneous text");
   }
View Full Code Here


     //http://feedvalidator.org/testcases/atom/4.1.3.2/content-src-extra-text.xml
     try {
       IRI uri = baseURI.resolve("4.1.3.2/content-src-extra-text.xml");
       Document<Feed> doc = get(uri);
       assertNotNull(doc);
       Entry entry = doc.getRoot().getEntries().get(0);
       Content content = entry.getContentElement();
       assertEquals(content.getResolvedSrc(), new IRI("http://example.org/2003/12/13/atom03"));
     } catch (Exception e) {}
   }
View Full Code Here

   public static void testSection4132ContentSrcNoTypeNoError() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.1.3.2/content-src-no-type-no-error.xml
     IRI uri = baseURI.resolve("4.1.3.2/content-src-no-type-no-error.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     Content content = entry.getContentElement();
     assertEquals(content.getResolvedSrc(), new IRI("http://example.org/2003/12/13/atom03"));
     assertNull(content.getMimeType());
   }
View Full Code Here

   public static void testSection4132ContentSrcNoType() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.1.3.2/content-src-no-type.xml
     IRI uri = baseURI.resolve("4.1.3.2/content-src-no-type.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     Content content = entry.getContentElement();
     assertEquals(content.getResolvedSrc(), new IRI("http://example.org/2003/12/13/atom03"));
     assertNull(content.getMimeType());
   }
View Full Code Here

   public static void testSection4132ContentSrcTypeHtml() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.1.3.2/content-src-type-html.xml
     IRI uri = baseURI.resolve("4.1.3.2/content-src-type-html.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     assertEquals(entry.getContent(),"");
     assertEquals(entry.getContentType(), Content.Type.HTML);
     assertEquals(entry.getContentElement().getResolvedSrc(), new IRI("http://example.org/2003/12/13/atom03"));
   }
View Full Code Here

   public static void testSection4132ContentSrcTypeTextHtml() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.1.3.2/content-src-type-text-html.xml
     IRI uri = baseURI.resolve("4.1.3.2/content-src-type-text-html.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     assertEquals(entry.getContent(),"");
     assertEquals(entry.getContentType(), Content.Type.MEDIA);
     assertEquals(entry.getContentElement().getResolvedSrc(), new IRI("http://example.org/2003/12/13/atom03"));
   }
View Full Code Here

   public static void testSection4132ContentSrcTypeText() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.1.3.2/content-src-type-text.xml
     IRI uri = baseURI.resolve("4.1.3.2/content-src-type-text.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     assertEquals(entry.getContent(),"");
     assertEquals(entry.getContentType(), Content.Type.TEXT);
     assertEquals(entry.getContentElement().getResolvedSrc(), new IRI("http://example.org/2003/12/13/atom03"));
   }
View Full Code Here

   public static void testSection4132ContentSrcTypeXhtml() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.1.3.2/content-src-type-xhtml.xml
     IRI uri = baseURI.resolve("4.1.3.2/content-src-type-xhtml.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     assertNull(entry.getContent());
     assertEquals(entry.getContentType(), Content.Type.XHTML);
     assertEquals(entry.getContentElement().getResolvedSrc(), new IRI("http://example.org/2003/12/13/atom03"));
   }
View Full Code Here

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

   public static void testSection4133ContentJpegInvalidBase64() throws Exception {
     //http://feedvalidator.org/testcases/atom/4.1.3.3/content-jpeg-invalid-base64.xml
     IRI uri = baseURI.resolve("4.1.3.3/content-jpeg-invalid-base64.xml");
     Document<Feed> doc = get(uri);
     assertNotNull(doc);
     Entry entry = doc.getRoot().getEntries().get(0);
     assertEquals(entry.getContentType(), Content.Type.MEDIA);
     assertEquals(entry.getContent(),"insert image here");
   }
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.