Package com.rometools.rome.feed.atom

Examples of com.rometools.rome.feed.atom.Feed


        feed.setFeedType("atom_1.0");
        return feed;
    }

    public void testReadWrite() throws Exception {
        Feed feed = createFeed();
        final StringWriter sw = new StringWriter();
        final WireFeedOutput output = new WireFeedOutput();
        output.output(feed, sw);
        sw.close();
        final StringReader reader = new StringReader(sw.toString());
        final WireFeedInput input = new WireFeedInput();
        feed = (Feed) input.build(reader);
        reader.close();
        assertEquals("<test>Hello Hello</test>", feed.getTitleEx().getValue().trim());
    }
View Full Code Here


        reader.close();
        assertEquals("<test>Hello Hello</test>", feed.getTitleEx().getValue().trim());
    }

    public void testXML() throws Exception {
        final Feed feed = createFeed();
        final StringWriter sw = new StringWriter();
        final WireFeedOutput output = new WireFeedOutput();
        output.output(feed, sw);
        sw.close();
        assertTrue(sw.toString().contains("<test xmlns=\"\">Hello Hello</test>"));
View Full Code Here

    public TestSyndFeedAtom10prefix() {
        super("atom_1.0_prefix.xml");
    }

    public void testTitle() throws Exception {
        final Feed feed = (Feed) getWireFeed();
        assertEquals("1", feed.getId());
        assertEquals("xxx1", feed.getOtherLinks().get(0).getRel());
        assertEquals("xxx2", feed.getOtherLinks().get(1).getRel());
        assertEquals("xxx11", feed.getOtherLinks().get(0).getType());
        assertEquals("xxx22", feed.getOtherLinks().get(1).getType());
        assertEquals("http://foo.com/1", feed.getOtherLinks().get(0).getHref());
        assertEquals("http://foo.com/2", feed.getOtherLinks().get(1).getHref());
    }
View Full Code Here

TOP

Related Classes of com.rometools.rome.feed.atom.Feed

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.