From c5740b184031502a24fa7598d146e7e093c7c0d0 Mon Sep 17 00:00:00 2001 From: "yihua.huang" Date: Wed, 15 Apr 2015 08:32:08 +0800 Subject: [PATCH] change assert #200 --- webmagic-core/src/test/java/us/codecraft/webmagic/HtmlTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/webmagic-core/src/test/java/us/codecraft/webmagic/HtmlTest.java b/webmagic-core/src/test/java/us/codecraft/webmagic/HtmlTest.java index ac2e9b11..a9e2c471 100644 --- a/webmagic-core/src/test/java/us/codecraft/webmagic/HtmlTest.java +++ b/webmagic-core/src/test/java/us/codecraft/webmagic/HtmlTest.java @@ -39,7 +39,7 @@ public class HtmlTest { assertThat(html.links().all()).contains("/xx/xx"); } - @Test + @Test(expected = NullPointerException) public void testNthNodesGet(){ Html html = new Html("xx"); assertThat(html.xpath("//a[1]/@href").get()).isEqualTo("/xx/xx");