summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/test/java/it/alessandroiezzi/csv/CSVUtilsTest.java34
-rw-r--r--src/test/resources/test.csv4
2 files changed, 38 insertions, 0 deletions
diff --git a/src/test/java/it/alessandroiezzi/csv/CSVUtilsTest.java b/src/test/java/it/alessandroiezzi/csv/CSVUtilsTest.java
new file mode 100644
index 0000000..2a15757
--- /dev/null
+++ b/src/test/java/it/alessandroiezzi/csv/CSVUtilsTest.java
@@ -0,0 +1,34 @@
+/*
+ * A simple CSV utility
+ * Copyright (C) 2022 Alessandro Iezzi <aiezzi AT alessandroiezzi DOT it>
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ */
+
+package it.alessandroiezzi.csv;
+
+import org.junit.Test;
+
+import java.io.File;
+import java.io.IOException;
+
+import static org.junit.Assert.*;
+
+public class CSVUtilsTest {
+ @Test
+ public void test_parseCSV() throws IOException {
+ CSVUtils csvUtils = new CSVUtils(getClass().getClassLoader().getResourceAsStream("test.csv"));
+ csvUtils.parse();
+ }
+}
diff --git a/src/test/resources/test.csv b/src/test/resources/test.csv
new file mode 100644
index 0000000..74999ac
--- /dev/null
+++ b/src/test/resources/test.csv
@@ -0,0 +1,4 @@
+codice;tag;blacklist
+999xx;;S
+888xx;Ale;
+7t7t7t7;;S \ No newline at end of file