OSDN Git Service

パッケージ変更。テスト整備。
[mikutoga/TogaGem.git] / src / test / java / jp / sfjp / mikutoga / bin / parser / MmdEofExceptionTest.java
diff --git a/src/test/java/jp/sfjp/mikutoga/bin/parser/MmdEofExceptionTest.java b/src/test/java/jp/sfjp/mikutoga/bin/parser/MmdEofExceptionTest.java
new file mode 100644 (file)
index 0000000..fb16c03
--- /dev/null
@@ -0,0 +1,57 @@
+/*
+ */
+
+package jp.sfjp.mikutoga.bin.parser;
+
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import static org.junit.Assert.*;
+
+/**
+ *
+ */
+public class MmdEofExceptionTest {
+
+    public MmdEofExceptionTest() {
+    }
+
+    @BeforeClass
+    public static void setUpClass() {
+    }
+
+    @AfterClass
+    public static void tearDownClass() {
+    }
+
+    @Before
+    public void setUp() {
+    }
+
+    @After
+    public void tearDown() {
+    }
+
+    @Test
+    public void testSomeMethod() {
+
+        MmdFormatException ex;
+
+        ex = new MmdEofException();
+        assertNull(ex.getMessage());
+
+        ex = new MmdEofException("ERROR");
+        assertEquals("ERROR", ex.getMessage());
+
+        ex = new MmdEofException(99);
+        assertEquals("(position:99)", ex.getMessage());
+
+        ex = new MmdEofException("ERROR", 99);
+        assertEquals("ERROR(position:99)", ex.getMessage());
+
+        return;
+    }
+
+}