Reorganise test system via Downloader/Cache
[gofetch.git] / src / be / nikiroo / gofetch / test / TestSlashdot.java
1 package be.nikiroo.gofetch.test;
2
3 import java.io.IOException;
4 import java.io.InputStream;
5 import java.net.URL;
6
7 import be.nikiroo.gofetch.support.Slashdot;
8 import be.nikiroo.gofetch.support.Type;
9
10 public class TestSlashdot extends TestBase {
11 static private Type type = Type.SLASHDOT;
12 static private TestBase base = null;
13
14 public TestSlashdot(String[] args) {
15 super(new Slashdot() {
16 @Override
17 protected InputStream open(URL url) throws IOException {
18 return base.download(url);
19 }
20
21 @Override
22 public Type getType() {
23 return type;
24 }
25 }, args);
26
27 base = this;
28 }
29 }