Package org.rssowl.core.connection

Examples of org.rssowl.core.connection.ConnectionManager.load()


    URL feedUrl = new URL("http://www.rssowl.org/rssowl2dg/tests/connection/authrequired/feed_rss.xml");
    IFeed feed = new Feed(feedUrl);
    AuthenticationRequiredException e = null;

    try {
      conManager.load(feed.getLink());
    } catch (AuthenticationRequiredException e1) {
      e = e1;
    }

    assertNotNull(e);
View Full Code Here


      }
    };

    credProvider.setAuthCredentials(credentials, feedUrl);

    InputStream inS = conManager.load(feed.getLink());
    assertNotNull(inS);

    Interpreter.getDefault().interpret(inS, feed);
    assertEquals("RSS 2.0", feed.getFormat());
  }
View Full Code Here

  public void testHTTPFeed() throws Exception {
    ConnectionManager conManager = ConnectionManager.getDefault();
    URL feedUrl = new URL("http://www.rssowl.org/rssowl2dg/tests/connection/rss_2_0.xml");
    IFeed feed = new Feed(feedUrl);

    InputStream inS = conManager.load(feed.getLink());
    assertNotNull(inS);

    Interpreter.getDefault().interpret(inS, feed);
    assertEquals("RSS 2.0", feed.getFormat());
  }
View Full Code Here

  public void testHTTPSFeed() throws Exception {
    ConnectionManager conManager = ConnectionManager.getDefault();
    URL feedUrl = new URL("https://sourceforge.net/export/rss2_projnews.php?group_id=141424&rss_fulltext=1");
    IFeed feed = new Feed(feedUrl);

    InputStream inS = conManager.load(feed.getLink());
    assertNotNull(inS);

    Interpreter.getDefault().interpret(inS, feed);
    assertEquals("RSS 2.0", feed.getFormat());
  }
View Full Code Here

    URL pluginLocation = FileLocator.toFileURL(Platform.getBundle("org.rssowl.core.tests").getEntry("/"));
    ConnectionManager conManager = ConnectionManager.getDefault();
    URL feedUrl = pluginLocation.toURI().resolve("data/interpreter/feed_rss.xml").toURL();
    IFeed feed = new Feed(feedUrl);

    InputStream inS = conManager.load(feed.getLink());
    assertNotNull(inS);

    Interpreter.getDefault().interpret(inS, feed);
    assertEquals("RSS 2.0", feed.getFormat());
  }
View Full Code Here

  public void testCustomProtocol() throws Exception {
    ConnectionManager conManager = ConnectionManager.getDefault();
    URL feedUrl = new URL("myprotocol://data/interpreter/feed_rss.xml");
    IFeed feed = new Feed(feedUrl);

    InputStream inS = conManager.load(feed.getLink());
    assertNotNull(inS);

    Interpreter.getDefault().interpret(inS, feed);
    assertEquals("RSS 2.0", feed.getFormat());
  }
View Full Code Here

    ConnectionManager conManager = ConnectionManager.getDefault();
    URL feedUrl = new URL("http://rss.slashdot.org/Slashdot/slashdot/to");
    IFeed feed = new Feed(feedUrl);
    NotModifiedException e = null;

    InputStream inS = conManager.load(feed.getLink());
    assertNotNull(inS);

    String ifModifiedSince = null;
    String ifNoneMatch = null;
    if (inS instanceof IConditionalGetCompatible) {
View Full Code Here

    ifNoneMatch = conditionalGet.getIfNoneMatch();
    if (ifNoneMatch != null)
      conProperties.put(IConnectionPropertyConstants.IF_NONE_MATCH, ifNoneMatch);

    try {
      conManager.load(feed.getLink(), conProperties);
    } catch (NotModifiedException e1) {
      e = e1;
    }

    assertNotNull(e);
View Full Code Here

    URL feedUrl = new URL("http://www.rssowl.org/rssowl2dg/tests/connection/authrequired/feed_rdf.xml");
    IFeed feed = new Feed(feedUrl);
    AuthenticationRequiredException e = null;

    try {
      conManager.load(feed.getLink());
    } catch (AuthenticationRequiredException e1) {
      e = e1;
    }

    assertNull(e);
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.