Fix new tests and make TestLWN work
[gofetch.git] / src / be / nikiroo / gofetch / test / TestLWN.java
index 597e761a328161cfdda66becfbb247f5fe96f71e..1025813c36aed7725e189ae6de2b92adfe0a6f77 100644 (file)
@@ -15,7 +15,32 @@ 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"));
+
+               map.put(new URL("https://lwn.net/"), new File("index.html"));
+
+               map.put(new URL("https://lwn.net/Articles/763252/"), new File(
+                               "Articles/763252.html"));
+               map.put(new URL("https://lwn.net/Articles/763987/"), new File(
+                               "Articles/763987.html"));
+               map.put(new URL("https://lwn.net/Articles/764046"), new File(
+                               "Articles/764046.html"));
+               map.put(new URL("https://lwn.net/Articles/764055"), new File(
+                               "Articles/764055.html"));
+               map.put(new URL("https://lwn.net/Articles/764130"), new File(
+                               "Articles/764130.html"));
+               map.put(new URL("https://lwn.net/Articles/764182"), new File(
+                               "Articles/764182.html"));
+               map.put(new URL("https://lwn.net/Articles/764184/"), new File(
+                               "Articles/764184.html"));
+               map.put(new URL("https://lwn.net/Articles/764202/"), new File(
+                               "Articles/764202.html"));
+               map.put(new URL("https://lwn.net/Articles/764219"), new File(
+                               "Articles/764219.html"));
+               map.put(new URL("https://lwn.net/Articles/764300"), new File(
+                               "Articles/764300.html"));
+               map.put(new URL("https://lwn.net/Articles/764321/"), new File(
+                               "Articles/764321.html"));
+
                return map;
        }
 
@@ -23,7 +48,7 @@ public class TestLWN extends TestBase {
                super(new LWN() {
                        @Override
                        protected InputStream open(URL url) throws IOException {
-                               return doOpen(getMap(), url);
+                               return doOpen(this, getMap(), url);
                        }
 
                        @Override