597e761a328161cfdda66becfbb247f5fe96f71e
[gofetch.git] / src / be / nikiroo / gofetch / test / TestLWN.java
1 package be.nikiroo.gofetch.test;
2
3 import java.io.File;
4 import java.io.IOException;
5 import java.io.InputStream;
6 import java.net.MalformedURLException;
7 import java.net.URL;
8 import java.util.HashMap;
9 import java.util.Map;
10
11 import be.nikiroo.gofetch.support.LWN;
12 import be.nikiroo.gofetch.support.Type;
13
14 public class TestLWN extends TestBase {
15
16 static private Map<URL, File> getMap() throws MalformedURLException {
17 Map<URL, File> map = new HashMap<URL, File>();
18 map.put(new URL("http://fanfan.be/"), new File("/tmp/none"));
19 return map;
20 }
21
22 public TestLWN(String[] args) {
23 super(new LWN() {
24 @Override
25 protected InputStream open(URL url) throws IOException {
26 return doOpen(getMap(), url);
27 }
28
29 @Override
30 public Type getType() {
31 return Type.LWN;
32 }
33 }, args);
34 }
35 }