Refactor JsoupParserTest
This commit is contained in:
parent
4772976bda
commit
94c315c1c2
@ -1,17 +1,19 @@
|
|||||||
package com.baeldung.jsoup;
|
package com.baeldung.jsoup;
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import org.jsoup.HttpStatusException;
|
import org.jsoup.HttpStatusException;
|
||||||
import org.jsoup.Jsoup;
|
import org.jsoup.Jsoup;
|
||||||
import org.jsoup.nodes.Document;
|
import org.jsoup.nodes.Document;
|
||||||
import org.jsoup.nodes.Element;
|
import org.jsoup.nodes.Element;
|
||||||
import org.jsoup.parser.Tag;
|
import org.jsoup.parser.Tag;
|
||||||
import org.jsoup.select.Elements;
|
import org.jsoup.select.Elements;
|
||||||
import static org.junit.Assert.assertEquals;
|
|
||||||
import static org.junit.Assert.assertTrue;
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
import static org.junit.Assert.assertEquals;
|
||||||
|
import static org.junit.Assert.assertTrue;
|
||||||
|
|
||||||
public class JsoupParserTest {
|
public class JsoupParserTest {
|
||||||
|
|
||||||
Document doc;
|
Document doc;
|
||||||
@ -70,7 +72,7 @@ public class JsoupParserTest {
|
|||||||
Elements children = firstSection.children();
|
Elements children = firstSection.children();
|
||||||
Elements siblings = firstSection.siblingElements();
|
Elements siblings = firstSection.siblingElements();
|
||||||
|
|
||||||
sections.stream().forEach(el -> System.out.println("section: " + el));
|
sections.forEach(el -> System.out.println("section: " + el));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
Loading…
x
Reference in New Issue
Block a user