aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/musichub
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/musichub')
-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);
+ }
+}