aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClyhtsuriva <aimeric@adjutor.xyz>2021-06-27 10:59:09 +0200
committerClyhtsuriva <aimeric@adjutor.xyz>2021-06-27 10:59:09 +0200
commit9cf446a8efaa8a6d16c260e343adb17ae3c75ff2 (patch)
treef7a4496edecec121fdfbb371ee4ef8b6e929f165
parent18359e9e2892a332f283476bc3ae887308f51cec (diff)
Starting the XMLHandler tests
-rw-r--r--src/test/java/musichub/util/XMLHandlerTest.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/test/java/musichub/util/XMLHandlerTest.java b/src/test/java/musichub/util/XMLHandlerTest.java
new file mode 100644
index 0000000..1be2258
--- /dev/null
+++ b/src/test/java/musichub/util/XMLHandlerTest.java
@@ -0,0 +1,30 @@
+package musichub.util;
+
+
+import org.junit.jupiter.api.Test;
+import org.w3c.dom.Document;
+import org.w3c.dom.NodeList;
+
+public class XMLHandlerTest {
+
+ final String DIR = System.getProperty("user.dir");
+ final String JUNIT_FILE_PATH = DIR + "/files/JUnit.xml";
+
+/* @Test
+ void testXMLHandlerClass() {
+ XMLHandler xmlHandler = new XMLHandler();
+ }*/
+
+ @Test
+ void testCreateXML() {
+ XMLHandler xmlHandler = new XMLHandler(); //XML class
+ Document document = xmlHandler.createXMLDocument(); //XMLDocument method
+ xmlHandler.createXMLFile(document, JUNIT_FILE_PATH); //XMLFile method
+ }
+
+ @Test
+ void testParseXMLFile() {
+ XMLHandler xmlHandler = new XMLHandler();
+ NodeList albumNodes = xmlHandler.parseXMLFile(JUNIT_FILE_PATH);
+ }
+}