diff --git a/pom.xml b/pom.xml
index 023997f..5a586fd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,4 +32,18 @@
+
+
+ org.junit.jupiter
+ junit-jupiter-api
+ 5.3.0
+ test
+
+
+ org.junit.jupiter
+ junit-jupiter-engine
+ 5.3.0
+ test
+
+
\ No newline at end of file
diff --git a/src/main/java/org/gjt/convert/binhex/BinHex4InputStream.java b/src/main/java/org/gjt/convert/binhex/BinHex4InputStream.java
index c3fe697..df5414d 100755
--- a/src/main/java/org/gjt/convert/binhex/BinHex4InputStream.java
+++ b/src/main/java/org/gjt/convert/binhex/BinHex4InputStream.java
@@ -449,27 +449,6 @@ public class BinHex4InputStream extends InputStream {
return (fl1 << 8) | fl2;
}
- public static void main(String[] args)
- {
- try (BinHex4InputStream in = new BinHex4InputStream(System.in)) {
- System.err.println(in.getHeader());
-
- byte[] buf = new byte[1024];
-
- System.err.println("Starting to convert");
- while(true)
- {
- int r = in.read(buf);
- if(r <= 0)
- return;
- System.out.write(buf, 0, r);
- }
- } catch(IOException e)
- {
- e.printStackTrace();
- }
- }
-
/**
One of three states: before header, in data fork, or in resource fork.
*/
diff --git a/src/main/java/org/gjt/convert/binhex/Hqx7_to_Hqx8InputStream.java b/src/main/java/org/gjt/convert/binhex/Hqx7_to_Hqx8InputStream.java
index 65a7542..29cd768 100755
--- a/src/main/java/org/gjt/convert/binhex/Hqx7_to_Hqx8InputStream.java
+++ b/src/main/java/org/gjt/convert/binhex/Hqx7_to_Hqx8InputStream.java
@@ -298,26 +298,6 @@ public class Hqx7_to_Hqx8InputStream extends FilterInputStream {
return len;
}
-
- public static void main(String[] args)
- {
- try (InputStream in = new Hqx7_to_Hqx8InputStream(System.in)) {
- byte[] buf = new byte[1024];
-
- System.err.println("Starting to convert");
- while(true)
- {
- int r = in.read(buf);
- if(r <= 0)
- return;
- System.out.write(buf, 0, r);
- }
- } catch(IOException e)
- {
- e.printStackTrace();
- }
- }
-
/**
A buffer for a maximum of two times six bits.
*/
diff --git a/src/main/java/org/gjt/convert/binhex/RLE_CRCInputStream.java b/src/main/java/org/gjt/convert/binhex/RLE_CRCInputStream.java
index 091b8d1..1e01fc9 100755
--- a/src/main/java/org/gjt/convert/binhex/RLE_CRCInputStream.java
+++ b/src/main/java/org/gjt/convert/binhex/RLE_CRCInputStream.java
@@ -254,26 +254,6 @@ public class RLE_CRCInputStream extends FilterInputStream {
return len;
}
-
- public static void main(String[] args)
- {
- try (InputStream in = new RLE_CRCInputStream(System.in)) {
- byte[] buf = new byte[1024];
-
- System.err.println("Starting to convert");
- while(true)
- {
- int r = in.read(buf);
- if(r <= 0)
- return;
- System.out.write(buf, 0, r);
- }
- } catch(IOException e)
- {
- e.printStackTrace();
- }
- }
-
/**
True if private method nextDecodedByte is still repeating a character
that was part of a Run-Length Encoding sequence.
diff --git a/src/test/java/org/gjt/convert/binhex/BinHex4InputStreamTest.java b/src/test/java/org/gjt/convert/binhex/BinHex4InputStreamTest.java
new file mode 100644
index 0000000..a9e9e8d
--- /dev/null
+++ b/src/test/java/org/gjt/convert/binhex/BinHex4InputStreamTest.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright (c) 2019 by Naohide Sano, All rights reserved.
+ *
+ * Programmed by Naohide Sano
+ */
+
+package org.gjt.convert.binhex;
+
+import java.io.IOException;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+
+/**
+ * BinHex4InputStreamTest.
+ *
+ * @author Naohide Sano (umjammer)
+ * @version 0.00 2019/06/11 umjammer initial version
+ */
+class BinHex4InputStreamTest {
+
+ @Test
+ void test() {
+ fail("Not yet implemented");
+ }
+
+ public static void main(String[] args) {
+ try (BinHex4InputStream in = new BinHex4InputStream(System.in)) {
+ System.err.println(in.getHeader());
+
+ byte[] buf = new byte[1024];
+
+ System.err.println("Starting to convert");
+ while (true) {
+ int r = in.read(buf);
+ if (r <= 0)
+ return;
+ System.out.write(buf, 0, r);
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+}
+
+/* */
diff --git a/src/test/java/org/gjt/convert/binhex/DeBinHexTest.java b/src/test/java/org/gjt/convert/binhex/DeBinHexTest.java
new file mode 100644
index 0000000..0b2058f
--- /dev/null
+++ b/src/test/java/org/gjt/convert/binhex/DeBinHexTest.java
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2019 by Naohide Sano, All rights reserved.
+ *
+ * Programmed by Naohide Sano
+ */
+
+package org.gjt.convert.binhex;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+/**
+ * DeBinHexTest.
+ *
+ * @author Naohide Sano (umjammer)
+ * @version 0.00 2019/06/11 umjammer initial version
+ */
+class DeBinHexTest {
+
+ @Test
+ void test() {
+ fail("Not yet implemented");
+ }
+
+}
+
+/* */
diff --git a/src/test/java/org/gjt/convert/binhex/Hqx7_to_Hqx8InputStreamTest.java b/src/test/java/org/gjt/convert/binhex/Hqx7_to_Hqx8InputStreamTest.java
new file mode 100644
index 0000000..683a7b0
--- /dev/null
+++ b/src/test/java/org/gjt/convert/binhex/Hqx7_to_Hqx8InputStreamTest.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2019 by Naohide Sano, All rights reserved.
+ *
+ * Programmed by Naohide Sano
+ */
+
+package org.gjt.convert.binhex;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+
+/**
+ * Hqx7_to_Hqx8InputStreamTest.
+ *
+ * @author Naohide Sano (umjammer)
+ * @version 0.00 2019/06/11 umjammer initial version
+ */
+class Hqx7_to_Hqx8InputStreamTest {
+
+ @Test
+ void test() {
+ fail("Not yet implemented");
+ }
+
+ public static void main(String[] args) {
+ try (InputStream in = new Hqx7_to_Hqx8InputStream(System.in)) {
+ byte[] buf = new byte[1024];
+
+ System.err.println("Starting to convert");
+ while (true) {
+ int r = in.read(buf);
+ if (r <= 0)
+ return;
+ System.out.write(buf, 0, r);
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+}
+
+/* */
diff --git a/src/test/java/org/gjt/convert/binhex/RLE_CRCInputStreamTest.java b/src/test/java/org/gjt/convert/binhex/RLE_CRCInputStreamTest.java
new file mode 100644
index 0000000..35a6704
--- /dev/null
+++ b/src/test/java/org/gjt/convert/binhex/RLE_CRCInputStreamTest.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright (c) 2019 by Naohide Sano, All rights reserved.
+ *
+ * Programmed by Naohide Sano
+ */
+
+package org.gjt.convert.binhex;
+
+import java.io.IOException;
+import java.io.InputStream;
+
+import org.junit.jupiter.api.Test;
+
+import static org.junit.jupiter.api.Assertions.*;
+
+
+/**
+ * RLE_CRCInputStreamTest.
+ *
+ * @author Naohide Sano (umjammer)
+ * @version 0.00 2019/06/11 umjammer initial version
+ */
+class RLE_CRCInputStreamTest {
+
+ @Test
+ void test() {
+ fail("Not yet implemented");
+ }
+
+ public static void main(String[] args) {
+ try (InputStream in = new RLE_CRCInputStream(System.in)) {
+ byte[] buf = new byte[1024];
+
+ System.err.println("Starting to convert");
+ while (true) {
+ int r = in.read(buf);
+ if (r <= 0)
+ return;
+ System.out.write(buf, 0, r);
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+}
+
+/* */