Package org.apache.abdera.model

Examples of org.apache.abdera.model.Source


            return;

        Feed feed = doc.getRoot();
        List<Entry> entries = feed.getEntries();
        for (Entry entry : entries) {
            Source source = entry.getSource();
            assertNotNull(source);
            assertEquals(2, source.getCategories().size());
        }
    }
View Full Code Here


            return;

        Feed feed = doc.getRoot();
        List<Entry> entries = feed.getEntries();
        for (Entry entry : entries) {
            Source source = entry.getSource();
            assertNotNull(source);
            assertEquals(2, source.getContributors().size());
        }
    }
View Full Code Here

        IRI uri = baseURI.resolve("4.2.11/source-entry.xml");
        Document<Feed> doc = get(uri);
        if (doc == null)
            return;
        Entry entry = doc.getRoot().getEntries().get(0);
        Source source = entry.getSource();
        assertNotNull(source);
    }
View Full Code Here

    //http://feedvalidator.org/testcases/atom/4.1.2/multiple-sources.xml
    IRI uri = baseURI.resolve("4.1.2/multiple-sources.xml");
    Document<Feed> doc = get(uri);
    assertNotNull(doc);
    Entry entry = doc.getRoot().getEntries().get(0);
    Source source = entry.getSource();
    assertEquals(source.getId(), new IRI("urn:uuid:9b056ae0-f778-11d9-8cd6-0800200c9a66"));
  }  
View Full Code Here

     //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

     //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

     //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

     //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

     //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

     assertNotNull(doc);
    
     Feed feed = doc.getRoot();
     List<Entry> entries = feed.getEntries();
     for (Entry entry : entries) {
       Source source = entry.getSource();
       assertNotNull(source);
       assertEquals(source.getAuthors().size(),2);
     }
   }
View Full Code Here

TOP

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

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.