blob: 1be2258fc955a3dae692848829310cec017cc33f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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);
}
}
|