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