|
16 | 16 |
|
17 | 17 | package com.marklogic.client.functionaltest; |
18 | 18 |
|
| 19 | +import static org.custommonkey.xmlunit.XMLAssert.assertXpathEvaluatesTo; |
| 20 | +import static org.junit.Assert.assertEquals; |
| 21 | +import static org.junit.Assert.assertTrue; |
| 22 | + |
19 | 23 | import java.io.File; |
20 | 24 | import java.io.IOException; |
21 | 25 |
|
22 | 26 | import javax.xml.transform.TransformerException; |
23 | 27 |
|
| 28 | +import org.custommonkey.xmlunit.exceptions.XpathException; |
| 29 | +import org.junit.After; |
| 30 | +import org.junit.AfterClass; |
| 31 | +import org.junit.BeforeClass; |
| 32 | +import org.junit.Test; |
| 33 | +import org.w3c.dom.Document; |
| 34 | + |
24 | 35 | import com.marklogic.client.DatabaseClient; |
25 | 36 | import com.marklogic.client.DatabaseClientFactory; |
26 | | -import com.marklogic.client.FailedRequestException; |
27 | 37 | import com.marklogic.client.DatabaseClientFactory.Authentication; |
| 38 | +import com.marklogic.client.FailedRequestException; |
28 | 39 | import com.marklogic.client.admin.ServerConfigurationManager; |
29 | 40 | import com.marklogic.client.io.DOMHandle; |
30 | 41 | import com.marklogic.client.io.FileHandle; |
|
35 | 46 | import com.marklogic.client.query.QueryManager; |
36 | 47 | import com.marklogic.client.query.RawCombinedQueryDefinition; |
37 | 48 | import com.marklogic.client.query.RawQueryByExampleDefinition; |
38 | | -import com.sun.jersey.api.client.ClientHandlerException; |
39 | | - |
40 | | -import static org.custommonkey.xmlunit.XMLAssert.assertXpathEvaluatesTo; |
41 | | -import static org.junit.Assert.*; |
42 | | - |
43 | | -import org.custommonkey.xmlunit.exceptions.XpathException; |
44 | | -import org.w3c.dom.Document; |
45 | | -import org.junit.*; |
46 | 49 |
|
47 | 50 | public class TestQueryByExample extends BasicJavaClientREST { |
48 | 51 | private static String dbName = "TestQueryByExampleDB"; |
@@ -299,7 +302,7 @@ public void testQueryByExampleXMLPermission() throws IOException, TransformerExc |
299 | 302 | System.out.println(result.getUri()+ ": Uri"); |
300 | 303 | assertEquals("Wrong Document Searched",result.getUri() , "/qbe/constraint1.xml"); |
301 | 304 | } |
302 | | - }catch(ClientHandlerException e){ |
| 305 | + }catch(Exception e){ |
303 | 306 | System.out.println("Negative Test Passed of executing nonreadable file"); |
304 | 307 | } |
305 | 308 | // release client |
|
0 commit comments