Examples of RSSDoc

@author Bill Brown

Examples of com.colorfulsoftware.rss.RSSDoc

   * @throws Exception
   *             if there is an issue setting up the data.
   */
  @Before
  public void setUp() throws Exception {
    rssDoc = new RSSDoc();
    rssDoc.setEncoding("ISO-8859-1");

    // add the indenting stream writer jar to the classpath
    // http://forums.sun.com/thread.jspa?threadID=300557&start=0&tstart=0
    URLClassLoader sysloader = (URLClassLoader) ClassLoader
View Full Code Here

Examples of com.colorfulsoftware.rss.RSSDoc

   * test the feed doc constructors.
   */
  @Test
  public void testFeedDocTest() {
    try {
      RSSDoc rss2 = null;
      List<RSSDoc.ProcessingInstruction> insts = new LinkedList<RSSDoc.ProcessingInstruction>();
      insts
          .add(new RSSDoc().new ProcessingInstruction(
              "xml-stylesheet",
              "href=\"http://www.blogger.com/styles/atom.css\" type=\"text/css\""));
      rss2 = new RSSDoc(insts);
      rss2.setEncoding("ISO-8859-1");
      System.out
          .println("pi before: " + rss2.getProcessingInstructions());
      assertNotNull(rss2);
      String output = rss2
          .readRSSToString(
              rss2
                  .readRSSToBean(new java.net.URL(
                      "http://omsa-uchicago.blogspot.com/feeds/posts/default?alt=rss")),
              null);
      assertTrue(output
          .indexOf("<?xml-stylesheet href=\"http://www.blogger.com/styles/atom.css\" type=\"text/css\"?>") != -1);
      // needed for running on windows
      rss2.setEncoding("ISO-8859-1");
      assertNotNull(rss2.readRSSToBean(output));
      try {
        rss2.readRSSToBean(badRSS);
        fail("should not get here.");
      } catch (Exception e) {
        assertTrue(e instanceof RSSpectException);
        assertEquals(e.getMessage(),
            "rss documents must contain the version attribute.");
View Full Code Here

Examples of com.colorfulsoftware.rss.RSSDoc

   * @throws Exception
   *             if there is an issue setting up the data.
   */
  @Before
  public void setUp() throws Exception {
    rssDoc = new RSSDoc();
    rssDoc.setEncoding("ISO-8859-1");

    // add the indenting stream writer jar to the classpath
    // http://forums.sun.com/thread.jspa?threadID=300557&start=0&tstart=0
    URLClassLoader sysloader = (URLClassLoader) ClassLoader
View Full Code Here

Examples of com.colorfulsoftware.rss.RSSDoc

   * test the feed doc constructors.
   */
  @Test
  public void testFeedDocTest() {
    try {
      RSSDoc rss2 = null;
      List<RSSDoc.ProcessingInstruction> insts = new LinkedList<RSSDoc.ProcessingInstruction>();
      insts
          .add(new RSSDoc().new ProcessingInstruction(
              "xml-stylesheet",
              "href=\"http://www.blogger.com/styles/atom.css\" type=\"text/css\""));
      rss2 = new RSSDoc(insts);
      rss2.setEncoding("ISO-8859-1");
      System.out
          .println("pi before: " + rss2.getProcessingInstructions());
      assertNotNull(rss2);
      String output = rss2
          .readRSSToString(
              rss2
                  .readRSSToBean(new java.net.URL(
                      "http://omsa-uchicago.blogspot.com/feeds/posts/default?alt=rss")),
              null);
      assertTrue(output
          .indexOf("<?xml-stylesheet href=\"http://www.blogger.com/styles/atom.css\" type=\"text/css\"?>") != -1);
      // needed for running on windows
      rss2.setEncoding("ISO-8859-1");
      assertNotNull(rss2.readRSSToBean(output));
      try {
        rss2.readRSSToBean(badRSS);
        fail("should not get here.");
      } catch (Exception e) {
        assertTrue(e instanceof RSSpectException);
        assertEquals(e.getMessage(),
            "rss documents must contain the version attribute.");
View Full Code Here

Examples of com.colorfulsoftware.rss.RSSDoc

   * @throws Exception
   *             if there is an issue setting up the data.
   */
  @Before
  public void setUp() throws Exception {
    rssDoc = new RSSDoc();
    rssDoc.setEncoding("ISO-8859-1");

    // add the indenting stream writer jar to the classpath
    // http://forums.sun.com/thread.jspa?threadID=300557&start=0&tstart=0
    URLClassLoader sysloader = (URLClassLoader) ClassLoader
View Full Code Here

Examples of com.colorfulsoftware.rss.RSSDoc

   * test the feed doc constructors.
   */
  @Test
  public void testFeedDocTest() {
    try {
      RSSDoc rss2 = null;
      List<RSSDoc.ProcessingInstruction> insts = new LinkedList<RSSDoc.ProcessingInstruction>();
      insts.add(new RSSDoc().new ProcessingInstruction("xml-stylesheet",
          "href=\"http://www.blogger.com/styles/atom.css\" type=\"text/css\""));
      rss2 = new RSSDoc(insts);
      rss2.setEncoding("ISO-8859-1");
      System.out
          .println("pi before: " + rss2.getProcessingInstructions());
      assertNotNull(rss2);
      String output = rss2
          .readRSSToString(
              rss2.readRSSToBean(new java.net.URL(
                  "http://omsa-uchicago.blogspot.com/feeds/posts/default?alt=rss")),
              null);
      assertTrue(output
          .indexOf("<?xml-stylesheet href=\"http://www.blogger.com/styles/atom.css\" type=\"text/css\"?>") != -1);
      // needed for running on windows
      rss2.setEncoding("ISO-8859-1");
      assertNotNull(rss2.readRSSToBean(output));
      try {
        rss2.readRSSToBean(badRSS);
        fail("should not get here.");
      } catch (Exception e) {
        assertTrue(e instanceof RSSpectException);
        assertEquals(e.getMessage(),
            "rss documents must contain the version attribute.");
View Full Code Here

Examples of com.colorfulsoftware.rss.RSSDoc

   * @throws Exception
   *             if there is an issue setting up the data.
   */
  @Before
  public void setUp() throws Exception {
    rssDoc = new RSSDoc();
    rssDoc.setEncoding("ISO-8859-1");

    // add the indenting stream writer jar to the classpath
    // http://forums.sun.com/thread.jspa?threadID=300557&start=0&tstart=0
    URLClassLoader sysloader = (URLClassLoader) ClassLoader
View Full Code Here

Examples of com.colorfulsoftware.rss.RSSDoc

   * test the feed doc constructors.
   */
  @Test
  public void testFeedDocTest() {
    try {
      RSSDoc rss2 = null;
      List<RSSDoc.ProcessingInstruction> insts = new LinkedList<RSSDoc.ProcessingInstruction>();
      insts.add(new RSSDoc().new ProcessingInstruction("xml-stylesheet",
          "href=\"http://www.blogger.com/styles/atom.css\" type=\"text/css\""));
      rss2 = new RSSDoc(insts);
      rss2.setEncoding("ISO-8859-1");
      System.out
          .println("pi before: " + rss2.getProcessingInstructions());
      assertNotNull(rss2);
      String output = rss2
          .readRSSToString(
              rss2.readRSSToBean(new java.net.URL(
                  "http://omsa-uchicago.blogspot.com/feeds/posts/default?alt=rss")),
              null);
      assertTrue(output
          .indexOf("<?xml-stylesheet href=\"http://www.blogger.com/styles/atom.css\" type=\"text/css\"?>") != -1);
      // needed for running on windows
      rss2.setEncoding("ISO-8859-1");
      assertNotNull(rss2.readRSSToBean(output));
      try {
        rss2.readRSSToBean(badRSS);
        fail("should not get here.");
      } catch (Exception e) {
        assertTrue(e instanceof RSSpectException);
        assertEquals(e.getMessage(),
            "rss documents must contain the version attribute.");
View Full Code Here

Examples of com.colorfulsoftware.rss.RSSDoc

   * @throws Exception
   *             if there is an issue setting up the data.
   */
  @Before
  public void setUp() throws Exception {
    rssDoc = new RSSDoc();
    rssDoc.setEncoding("ISO-8859-1");

    // add the indenting stream writer jar to the classpath
    // http://forums.sun.com/thread.jspa?threadID=300557&start=0&tstart=0
    URLClassLoader sysloader = (URLClassLoader) ClassLoader
View Full Code Here

Examples of com.colorfulsoftware.rss.RSSDoc

   * test the feed doc constructors.
   */
  @Test
  public void testFeedDocTest() {
    try {
      RSSDoc rss2 = null;
      List<RSSDoc.ProcessingInstruction> insts = new LinkedList<RSSDoc.ProcessingInstruction>();
      insts.add(new RSSDoc().new ProcessingInstruction("xml-stylesheet",
          "href=\"http://www.blogger.com/styles/atom.css\" type=\"text/css\""));
      rss2 = new RSSDoc(insts);
      rss2.setEncoding("ISO-8859-1");
      System.out
          .println("pi before: " + rss2.getProcessingInstructions());
      assertNotNull(rss2);
      String output = rss2
          .readRSSToString(
              rss2.readRSSToBean(new java.net.URL(
                  "http://omsa-uchicago.blogspot.com/feeds/posts/default?alt=rss")),
              null);
      assertTrue(output
          .indexOf("<?xml-stylesheet href=\"http://www.blogger.com/styles/atom.css\" type=\"text/css\"?>") != -1);
      // needed for running on windows
      rss2.setEncoding("ISO-8859-1");
      assertNotNull(rss2.readRSSToBean(output));
      try {
        rss2.readRSSToBean(badRSS);
        fail("should not get here.");
      } catch (Exception e) {
        assertTrue(e instanceof RSSpectException);
        assertEquals(e.getMessage(),
            "rss documents must contain the version attribute.");
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.