Test: add TooLinux
[gofetch.git] / src / be / nikiroo / gofetch / test / TestTooLinux.java
diff --git a/src/be/nikiroo/gofetch/test/TestTooLinux.java b/src/be/nikiroo/gofetch/test/TestTooLinux.java
new file mode 100644 (file)
index 0000000..bb30b3f
--- /dev/null
@@ -0,0 +1,31 @@
+package be.nikiroo.gofetch.test;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import be.nikiroo.gofetch.support.TooLinux;
+import be.nikiroo.gofetch.support.Type;
+
+public class TestTooLinux extends TestBase {
+       static private Type type = Type.TOO_LINUX;
+       static private TestBase base = null;
+
+       public TestTooLinux(String[] args) {
+               super(new TooLinux() {
+                       @Override
+                       protected InputStream open(URL url) throws IOException {
+                               return base.download(url);
+                       }
+
+                       @Override
+                       public Type getType() {
+                               return type;
+                       }
+               }, args);
+
+               base = this;
+       }
+}