diff options
author | 2023-05-02 10:50:01 +0200 | |
---|---|---|
committer | 2023-05-02 10:50:01 +0200 | |
commit | 14cc2f02f58e200949ea70d06dc198be3092afb0 (patch) | |
tree | 9db93eefe9be7327b4072aee12632415bbab3136 /src | |
parent | 32774a0aa4f9ffd07297278a891672512d5605c1 (diff) | |
download | csv-utils-14cc2f02f58e200949ea70d06dc198be3092afb0.tar.gz csv-utils-14cc2f02f58e200949ea70d06dc198be3092afb0.zip |
Add unit tests
Diffstat (limited to 'src')
-rw-r--r-- | src/test/java/it/alessandroiezzi/csv/CSVUtilsTest.java | 34 | ||||
-rw-r--r-- | src/test/resources/test.csv | 4 |
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 |