import org.testng.Assert;
import org.testng.annotations.Test;
-public class UrlDownloadClientTest {
+public class UrlDownloadClientTest
+{
/**
* Test that url is successfully loaded into download file
public void UrlDownloadTest()
{
UrlDownloadClient client = new UrlDownloadClient();
- String urlstring = "http://identifiers.org/rest/collections/";
+ String urlstring = "http://www.jalview.org/services/identifiers";
+ // was "http://identifiers.org/rest/collections/";
String outfile = "testfile.tmp";
try
// download file has a believable size
// identifiers.org file typically at least 250K
- Assert.assertTrue(f.length() > 250000);
-
+ long n = f.length();
if (f.exists())
{
f.delete();
}
+ // 74589
+ Assert.assertTrue(n > 70000);
+
}
* Test that garbage in results in IOException
*/
@Test(
- groups = { "Network" },
+ groups =
+ { "Network" },
enabled = true,
- expectedExceptions = { IOException.class })
+ expectedExceptions =
+ { IOException.class })
public void DownloadGarbageUrlTest() throws IOException
{
UrlDownloadClient client = new UrlDownloadClient();