Skip to content

Commit 423ca0e

Browse files
Add meaningful assertions
1 parent 24bf0e9 commit 423ca0e

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/test/java/org/apache/commons/jxpath/issues/JXPath113Test.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package org.apache.commons.jxpath.issues;
1818

1919
import java.io.StringReader;
20+
import java.util.List;
2021

2122
import javax.xml.parsers.DocumentBuilder;
2223
import javax.xml.parsers.DocumentBuilderFactory;
@@ -28,7 +29,8 @@
2829
import org.w3c.dom.Document;
2930
import org.xml.sax.InputSource;
3031

31-
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;
32+
import static org.junit.jupiter.api.Assertions.assertNotNull;
33+
import static org.junit.jupiter.api.Assertions.assertTrue;
3234

3335
public class JXPath113Test extends AbstractJXPathTest
3436
{
@@ -39,7 +41,9 @@ public void testIssue113() throws Exception
3941
final Document doc = JAXP.getDocument("<xml/>");
4042
final JXPathContext context = JXPathContext.newContext(doc);
4143

42-
assertDoesNotThrow(() -> context.selectNodes("//following-sibling::node()"));
44+
List result = context.selectNodes("//following-sibling::node()");
45+
assertNotNull(result);
46+
assertTrue(result.isEmpty());
4347
}
4448

4549
static class JAXP

0 commit comments

Comments
 (0)