git://git.nikiroo.be
/
gofetch.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reorganise test system via Downloader/Cache
[gofetch.git]
/
src
/
be
/
nikiroo
/
gofetch
/
test
/
TestLWN.java
diff --git
a/src/be/nikiroo/gofetch/test/TestLWN.java
b/src/be/nikiroo/gofetch/test/TestLWN.java
index 597e761a328161cfdda66becfbb247f5fe96f71e..a7012b27e8710045589320b9a76c0a8dbb9d6312 100644
(file)
--- a/
src/be/nikiroo/gofetch/test/TestLWN.java
+++ b/
src/be/nikiroo/gofetch/test/TestLWN.java
@@
-1,35
+1,29
@@
package be.nikiroo.gofetch.test;
package be.nikiroo.gofetch.test;
-import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.net.MalformedURLException;
import java.net.URL;
import java.net.URL;
-import java.util.HashMap;
-import java.util.Map;
import be.nikiroo.gofetch.support.LWN;
import be.nikiroo.gofetch.support.Type;
public class TestLWN extends TestBase {
import be.nikiroo.gofetch.support.LWN;
import be.nikiroo.gofetch.support.Type;
public class TestLWN extends TestBase {
-
- static private Map<URL, File> getMap() throws MalformedURLException {
- Map<URL, File> map = new HashMap<URL, File>();
- map.put(new URL("http://fanfan.be/"), new File("/tmp/none"));
- return map;
- }
+ static private Type type = Type.LWN;
+ static private TestBase base = null;
public TestLWN(String[] args) {
super(new LWN() {
@Override
protected InputStream open(URL url) throws IOException {
public TestLWN(String[] args) {
super(new LWN() {
@Override
protected InputStream open(URL url) throws IOException {
- return
doOpen(getMap(),
url);
+ return
base.download(
url);
}
@Override
public Type getType() {
}
@Override
public Type getType() {
- return
Type.LWN
;
+ return
type
;
}
}, args);
}
}, args);
+
+ base = this;
}
}
}
}