1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.springframework.xml.xpath;
18
19 import junit.framework.TestCase;
20
21 public class XPathExpressionFactoryTest extends TestCase {
22
23 public void testCreateXPathExpression() throws Exception {
24 XPathExpression expression = XPathExpressionFactory.createXPathExpression("/root");
25 assertNotNull("No expression returned", expression);
26 }
27
28 public void testCreateEmptyXPathExpression() throws Exception {
29 try {
30 XPathExpressionFactory.createXPathExpression("");
31 fail("Should have thrown an Exception");
32 }
33 catch (IllegalArgumentException ex) {
34
35 }
36 }
37 }