Package java.io

Examples of java.io.File.toURL()


    assertEquals(ChannelFormat.RSS_0_92, actualFormat);
  }
 
  public void testFormatRSS10xmlhack() throws Exception {
    File inpFile = new File(getDataDir(), "xmlhack-1.0.xml");
    ChannelFormat actualFormat = FormatDetector.getFormat(inpFile.toURL());
    assertEquals(ChannelFormat.RSS_1_0, actualFormat);
  }
 
  public void testFormatRSS10slashdot() throws Exception {
    File inpFile = new File(getDataDir(), "slashdot.rdf");
View Full Code Here


    assertEquals(ChannelFormat.RSS_1_0, actualFormat);
  }
 
  public void testFormatRSS10slashdot() throws Exception {
    File inpFile = new File(getDataDir(), "slashdot.rdf");
    ChannelFormat actualFormat = FormatDetector.getFormat(inpFile.toURL());
    assertEquals(ChannelFormat.RSS_1_0, actualFormat);
  }

  public void testFormatRSS10googleweblog() throws Exception {
    File inpFile = new File(getDataDir(), "google-weblog.rdf");
View Full Code Here

    assertEquals(ChannelFormat.RSS_1_0, actualFormat);
  }

  public void testFormatRSS10googleweblog() throws Exception {
    File inpFile = new File(getDataDir(), "google-weblog.rdf");
    ChannelFormat actualFormat = FormatDetector.getFormat(inpFile.toURL());
    assertEquals(ChannelFormat.RSS_1_0, actualFormat);
  }

  public void testFormatRSS10w3csynd() throws Exception {
    File inpFile = new File(getDataDir(), "w3c-synd.rdf");
View Full Code Here

    assertEquals(ChannelFormat.RSS_1_0, actualFormat);
  }

  public void testFormatRSS10w3csynd() throws Exception {
    File inpFile = new File(getDataDir(), "w3c-synd.rdf");
    ChannelFormat actualFormat = FormatDetector.getFormat(inpFile.toURL());
    assertEquals(ChannelFormat.RSS_1_0, actualFormat);
  }

  public void testFormatRSS20A() throws Exception {
    File inpFile = new File(getDataDir(), "informa-projnews.xml");
View Full Code Here

    assertEquals(ChannelFormat.RSS_1_0, actualFormat);
  }

  public void testFormatRSS20A() throws Exception {
    File inpFile = new File(getDataDir(), "informa-projnews.xml");
    ChannelFormat actualFormat = FormatDetector.getFormat(inpFile.toURL());
    assertEquals(ChannelFormat.RSS_2_0, actualFormat);
  }

  public void testFormatRSS20B() throws Exception {
    File inpFile = new File(getDataDir(), "snipsnap-org.rss");
View Full Code Here

    assertEquals(ChannelFormat.RSS_2_0, actualFormat);
  }

  public void testFormatRSS20B() throws Exception {
    File inpFile = new File(getDataDir(), "snipsnap-org.rss");
    ChannelFormat actualFormat = FormatDetector.getFormat(inpFile.toURL());
    assertEquals(ChannelFormat.RSS_2_0, actualFormat);
  }

  public void testUnsupportedFormat() throws Exception {
    File inpFile = new File(getDataDir(), "dir-xml-rpc-com.opml");
View Full Code Here

  }

  public void testUnsupportedFormat() throws Exception {
    File inpFile = new File(getDataDir(), "dir-xml-rpc-com.opml");
    try {
      FormatDetector.getFormat(inpFile.toURL());
      fail("This format is not yet supported ...");
    } catch (UnsupportedFormatException e) {
      assertTrue(true);
    }
  }
View Full Code Here

    }
  }

  public void testAtom0_3() throws Exception {
    File inpFile = new File(getDataDir(), "atom0-3.xml");
    ChannelFormat actualFormat = FormatDetector.getFormat(inpFile.toURL());
    assertEquals(ChannelFormat.ATOM_0_3, actualFormat);
  }
}
View Full Code Here

  public void XXXtestCreate() throws Exception {
    ChannelRegistry reg = new ChannelRegistry(new ChannelBuilder());
    // first channel
    File inpFile = new File(getDataDir(), "xmlhack-0.91.xml");
    ChannelIF chA = reg.addChannel(inpFile.toURL(), 2, true);
    Date dateA = chA.getLastUpdated();
    assertNull("channel shouldn't be parsed now", dateA);
    // second channel
    inpFile = new File(getDataDir(), "pro-linux.rdf");
    ChannelIF chB = reg.addChannel(inpFile.toURL(), 2, true);
View Full Code Here

    ChannelIF chA = reg.addChannel(inpFile.toURL(), 2, true);
    Date dateA = chA.getLastUpdated();
    assertNull("channel shouldn't be parsed now", dateA);
    // second channel
    inpFile = new File(getDataDir(), "pro-linux.rdf");
    ChannelIF chB = reg.addChannel(inpFile.toURL(), 2, true);
    // third channel
    inpFile = new File(getDataDir(), "snipsnap-org.rss");
    ChannelIF chC = reg.addChannel(inpFile.toURL(), 2, true);
    // some basic assertions
    assertEquals("channel exists", 3, reg.getChannels().size());
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.