Package org.eclipse.ecf.filetransfer.events

Examples of org.eclipse.ecf.filetransfer.events.IRemoteFileSystemBrowseEvent


      testBrowse(testURLs[i]);
      Thread.sleep(10000);
    }
    assertHasEventCount(events, IRemoteFileSystemBrowseEvent.class, 3);
    for (Iterator iterator = events.iterator(); iterator.hasNext();) {
      IRemoteFileSystemBrowseEvent event = (IRemoteFileSystemBrowseEvent) iterator
          .next();
      assertNotNull(event);
      final IRemoteFile[] remoteFiles = event.getRemoteFiles();
      assertNotNull(remoteFiles);
      assertEquals(1, remoteFiles.length);
      if (event.getFileID().getName()
          .equals("https://www.verisign.com/index.html")
          || event.getFileID().getName()
              .equals("http://google.com:80")) {
        verifyRemoteFilesWithoutLastModifiedAndContentLength(remoteFiles);
      } else {
        verifyRemoteFiles(remoteFiles);
      }
View Full Code Here


 
  public void testBrowseUnknownHost() throws Exception {
    testBrowse(new URL(URLRetrieveTestUnknownHost.HTTP_UNKNOWN_HOST_URL));
    Thread.sleep(3000);
    assertHasEventCount(events, IRemoteFileSystemBrowseEvent.class, 1);
    IRemoteFileSystemBrowseEvent event = (IRemoteFileSystemBrowseEvent) events.get(0);
    assertNotNull(event);
    final IRemoteFile[] remoteFiles = event.getRemoteFiles();
    assertNull(remoteFiles);
    Exception e = event.getException();
    assertNotNull(e);
    if (e instanceof BrowseFileTransferException) {
      BrowseFileTransferException ifte = (BrowseFileTransferException) e;
      assertTrue(ifte.getCause() instanceof UnknownHostException);
    } else fail("Event exception is not instance of BrowseFileTransferException");
View Full Code Here

  /**
   * @return file system directory event
   */
  protected IRemoteFileSystemEvent createRemoteFileEvent() {
    return new IRemoteFileSystemBrowseEvent() {

      public IFileID getFileID() {
        return fileID;
      }

View Full Code Here

TOP

Related Classes of org.eclipse.ecf.filetransfer.events.IRemoteFileSystemBrowseEvent

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.