Package org.rssowl.ui.internal.services.DownloadService

Examples of org.rssowl.ui.internal.services.DownloadService.DownloadRequest


  @Test
  public void testAttachmentNameGivenFileNotExistNormal() throws Exception {
    File tmpDir = getTmpDir();
    String fileName = "mytest.txt";

    DownloadRequest request = getAttachmentDownloadRequest("http://www.rssowl.org/rssowl2dg/tests/download/test.txt", "text/plain", 23, tmpDir, fileName);
    fService.download(request);

    File download = new File(tmpDir, "mytest.txt");
    assertTrue(download.exists());
    download.delete();
View Full Code Here


  @Test
  public void testAttachmentNameGivenFileNotExistContentDisposition() throws Exception {
    File tmpDir = getTmpDir();
    String fileName = "mytest.txt";

    DownloadRequest request = getAttachmentDownloadRequest("http://www.jtricks.com/download-text", null, 0, tmpDir, fileName);
    fService.download(request);

    File download = new File(tmpDir, fileName);
    assertTrue(download.exists());
    download.delete();
View Full Code Here

   */
  @Test
  public void testAttachmentNoNameGivenFileNotExistNormal() throws Exception {
    File tmpDir = getTmpDir();

    DownloadRequest request = getAttachmentDownloadRequest("http://www.rssowl.org/rssowl2dg/tests/download/test.txt", null, 20, tmpDir, null);
    fService.download(request);

    File download = new File(tmpDir, "test.txt");
    assertTrue(download.exists());
    download.delete();
View Full Code Here

   */
  @Test
  public void testAttachmentNoNameGivenFileNotExistContentDisposition() throws Exception {
    File tmpDir = getTmpDir();

    DownloadRequest request = getAttachmentDownloadRequest("http://www.jtricks.com/download-text", null, 0, tmpDir, null);
    fService.download(request);

    File download = new File(tmpDir, "content.txt");
    assertTrue(download.exists());
    download.delete();
View Full Code Here

    File tmpDir = getTmpDir();
    String fileName = "mytest.txt";

    Date date = new Date(System.currentTimeMillis());

    DownloadRequest request = getAttachmentDownloadRequest("http://www.rssowl.org/rssowl2dg/tests/download/test.txt", null, 0, tmpDir, fileName, date);
    fService.download(request);

    File download = new File(tmpDir, "mytest.txt");
    assertTrue(download.exists());
View Full Code Here

  public void testAttachmentNoNameGivenFileExists() throws Exception {
    File tmpDir = getTmpDir();

    Date date = new Date(System.currentTimeMillis());

    DownloadRequest request = getAttachmentDownloadRequest("http://www.rssowl.org/rssowl2dg/tests/download/test.txt", null, 0, tmpDir, null, date);
    fService.download(request);

    File download = new File(tmpDir, "test.txt");
    assertTrue(download.exists());
View Full Code Here

   */
  @Test
  public void testNewsTextFile() throws Exception {
    File tmpDir = getTmpDir();

    DownloadRequest request = getNewsDownloadRequest("http://www.rssowl.org/rssowl2dg/tests/download/test.txt", tmpDir);
    fService.download(request);

    File download = new File(tmpDir, "test.txt");
    assertTrue(download.exists());
    download.delete();
View Full Code Here

   */
  @Test
  public void testNewsWebsite() throws Exception {
    File tmpDir = getTmpDir();

    DownloadRequest request = getNewsDownloadRequest("http://www.rssowl.org/rssowl2dg/tests/download/test.html", tmpDir);
    fService.download(request);

    File download = new File(tmpDir, "test.html");
    assertTrue(!download.exists());
  }
View Full Code Here

   */
  @Test
  public void testNewsContentDisposition() throws Exception {
    File tmpDir = getTmpDir();

    DownloadRequest request = getNewsDownloadRequest("http://www.jtricks.com/download-text", tmpDir);
    fService.download(request);

    File download = new File(tmpDir, "content.txt");
    assertTrue(download.exists());
    download.delete();
View Full Code Here

TOP

Related Classes of org.rssowl.ui.internal.services.DownloadService.DownloadRequest

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.