Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,13 @@ public void tearDown() throws Exception {

@Test
public void testJsonDownload() throws Exception {
new GZippedJsonDownloader(downloader, new URL("http://downloads.arduino.cc/libraries/library_index.json"),
new URL("http://downloads.arduino.cc/libraries/library_index.json.gz"))
// URL url = new URL("http://downloads.arduino.cc/libraries/library_index.json")
// URL gzUrl = new URL("http://downloads.arduino.cc/libraries/library_index.json.gz")

URL url = GZippedJsonDownloader.class.getResource("/library_index.json");
URL gzUrl = GZippedJsonDownloader.class.getResource("/library_index.json.gz");

new GZippedJsonDownloader(downloader, url, gzUrl)
.download(tempFile, new MultiStepProgress(1), "", new NoopProgressListener(), true);

InputStream indexIn = new FileInputStream(tempFile);
Expand Down
6 changes: 5 additions & 1 deletion app/test/cc/arduino/contributions/JsonDownloaderTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,11 @@ public void tearDown() throws Exception {

@Test
public void testJsonDownload() throws Exception {
new JsonDownloader(downloader, new URL("http://downloads.arduino.cc/libraries/library_index.json"))
// URL url = new URL("http://downloads.arduino.cc/libraries/library_index.json")

URL url = JsonDownloader.class.getResource("/library_index.json");

new JsonDownloader(downloader, url)
.download(tempFile, new MultiStepProgress(1), "", new NoopProgressListener(), true);

InputStream indexIn = new FileInputStream(tempFile);
Expand Down
Loading