Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorslewis2012-05-12 22:25:52 -0400
committerslewis2012-05-12 22:25:52 -0400
commit101bf562519c3797f1fc69324c3176d75891c24e (patch)
tree9b07b250306113976aeb1f639c8b428d1513c4cc
parent7e87853dd661c441d35bb5bdbd0317149fd83652 (diff)
downloadorg.eclipse.ecf-101bf562519c3797f1fc69324c3176d75891c24e.tar.gz
org.eclipse.ecf-101bf562519c3797f1fc69324c3176d75891c24e.tar.xz
org.eclipse.ecf-101bf562519c3797f1fc69324c3176d75891c24e.zip
Fix for test code in URLBrowseTest
-rwxr-xr-xtests/bundles/org.eclipse.ecf.tests.filetransfer/src/org/eclipse/ecf/tests/filetransfer/URLBrowseTest.java24
1 files changed, 14 insertions, 10 deletions
diff --git a/tests/bundles/org.eclipse.ecf.tests.filetransfer/src/org/eclipse/ecf/tests/filetransfer/URLBrowseTest.java b/tests/bundles/org.eclipse.ecf.tests.filetransfer/src/org/eclipse/ecf/tests/filetransfer/URLBrowseTest.java
index 258b534b1..cb1400cb8 100755
--- a/tests/bundles/org.eclipse.ecf.tests.filetransfer/src/org/eclipse/ecf/tests/filetransfer/URLBrowseTest.java
+++ b/tests/bundles/org.eclipse.ecf.tests.filetransfer/src/org/eclipse/ecf/tests/filetransfer/URLBrowseTest.java
@@ -68,20 +68,24 @@ public class URLBrowseTest extends AbstractBrowseTestCase {
}
assertHasEventCount(events, IRemoteFileSystemBrowseEvent.class, 3);
for (Iterator iterator = events.iterator(); iterator.hasNext();) {
- IRemoteFileSystemBrowseEvent event = (IRemoteFileSystemBrowseEvent) iterator.next();
+ 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);
+ if (remoteFiles != null) {
+ 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);
+ }
}
}
-
+
}
public void testBrowseUnknownHost() throws Exception {

Back to the top