Examples of FeedAggregatorDAO


Examples of org.jboss.seam.wiki.connectors.feed.FeedAggregatorDAO

    @Test
    public void getFeedDTOs() throws Exception {

        new NonFacesRequest() {
            protected void renderResponse() throws Exception {
                FeedAggregatorDAO dao = (FeedAggregatorDAO)getInstance(FeedAggregatorDAO.class);

                URL[] feedURLs = {
                    new URL("http://foo"), new URL("http://bar")
                };

                List<FeedEntryDTO> dtos = dao.getLatestFeedEntries(30, feedURLs);
                assert dtos.size() == 0; // Asynchronous cache needs to do its job first

                Thread.sleep(4000);

                dtos = dao.getLatestFeedEntries(30, feedURLs);
                assert dtos.size() == 3;

            }
        }.run();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.