BAEL-3219

Parsing an XML File Using SAX Parser
This commit is contained in:
yassin.hajaj 2019-08-31 15:40:44 +02:00 committed by Yassin Hajaj
parent 6e77eef313
commit 21804927e3
1 changed files with 3 additions and 3 deletions

View File

@ -11,15 +11,15 @@ import java.util.List;
import static org.junit.Assert.*;
public class SaxParserMainTest {
public class SaxParserMainUnitTest {
@Test
void parse_baeldung_xml_document() throws IOException, SAXException, ParserConfigurationException {
public void parse_baeldung_xml_document() throws IOException, SAXException, ParserConfigurationException {
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser saxParser = factory.newSAXParser();
SaxParserMain.BaeldungHandler baeldungHandler = new SaxParserMain.BaeldungHandler();
saxParser.parse("xml\\src\\test\\resources\\sax\\baeldung.xml", baeldungHandler);
saxParser.parse("src\\test\\resources\\sax\\baeldung.xml", baeldungHandler);
SaxParserMain.Baeldung result = baeldungHandler.getWebsite();