Version 1.2.3: getVersion, openResource, fixes
[nikiroo-utils.git] / src / be / nikiroo / utils / test / IOUtilsTest.java
diff --git a/src/be/nikiroo/utils/test/IOUtilsTest.java b/src/be/nikiroo/utils/test/IOUtilsTest.java
new file mode 100644 (file)
index 0000000..5046940
--- /dev/null
@@ -0,0 +1,31 @@
+package be.nikiroo.utils.test;
+
+import java.io.InputStream;
+
+import be.nikiroo.utils.IOUtils;
+
+public class IOUtilsTest extends TestLauncher {
+
+       public IOUtilsTest(String[] args) {
+               super("IOUtils test", args);
+
+               addTest(new TestCase("openResource") {
+                       @Override
+                       public void test() throws Exception {
+                               InputStream in = IOUtils.openResource("VERSION");
+                               assertNotNull(
+                                               "The VERSION file is supposed to be present in the binaries",
+                                               in);
+                               in.close();
+                       }
+               });
+
+               addTest(new TestCase("getVersion") {
+                       @Override
+                       public void test() throws Exception {
+                               assertNotNull("The VERSION is not defined",
+                                               IOUtils.getVersion());
+                       }
+               });
+       }
+}