Skip to content

Commit d3cac57

Browse files
committed
updated the test after all the issues for the test addressed
1 parent ec74ff8 commit d3cac57

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

test-complete/src/test/java/com/marklogic/javaclient/TestEvalXquery.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public class TestEvalXquery extends BasicJavaClientREST {
5656
@BeforeClass
5757
public static void setUpBeforeClass() throws Exception {
5858
System.out.println("In setup");
59-
setupJavaRESTServer(dbName, fNames[0], restServerName,restPort);
59+
TestEvalXquery.setupJavaRESTServer(dbName, fNames[0], restServerName,restPort);
6060
TestEvalXquery.createUserRolesWithPrevilages("test-eval", "xdbc:eval","any-uri","xdbc:invoke");
6161
TestEvalXquery.createRESTUser("eval-user", "x", "test-eval");
6262
// System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.http.wire", "debug");
@@ -141,10 +141,10 @@ else if(er.getType().equals(Type.STRING)){
141141

142142
}else if(er.getType().equals(Type.DATE)){
143143
// System.out.println("Testing is DATE? "+er.getAs(String.class));
144-
assertEquals("Returns me a date :","2002-03-07-07:00",er.getAs(String.class));
144+
assertEquals("Returns me a date :","2002-03-07-08:00",er.getAs(String.class));
145145
}else if(er.getType().equals(Type.DATETIME)){
146146
// System.out.println("Testing is DATETIME? "+er.getAs(String.class));
147-
assertEquals("Returns me a dateTime :","2010-01-06T18:13:50.874-07:00",er.getAs(String.class));
147+
assertEquals("Returns me a dateTime :","2010-01-06T17:13:50.874-08:00",er.getAs(String.class));
148148

149149
}else if(er.getType().equals(Type.DECIMAL)){
150150
// System.out.println("Testing is Decimal? "+er.getAs(String.class));
@@ -302,11 +302,11 @@ public void testXqueryDifferentVariableTypes() throws Exception {
302302
+"declare variable $myDecimal as xs:decimal external;"
303303
+"declare variable $myDouble as xs:double external;"
304304
+"declare variable $myFloat as xs:float external;"
305-
+"declare variable $myXmlNode as xs:string external;"
305+
+"declare variable $myXmlNode as document-node() external;"
306306
+"declare variable $myNull external;"
307-
+"( $test:myString, $myBool,$myInteger,$myDecimal,$myDouble,$myFloat, document{ xdmp:unquote($myXmlNode) },"
308-
+"xdmp:unquote($myXmlNode)//comment(),xdmp:unquote($myXmlNode)//text(),xdmp:unquote($myXmlNode)//*,"
309-
+"xdmp:unquote($myXmlNode)/@attr, xdmp:unquote($myXmlNode)//processing-instruction())";
307+
+"( $test:myString, $myBool,$myInteger,$myDecimal,$myDouble,$myFloat, document{ ($myXmlNode) },"
308+
+"($myXmlNode)//comment(),($myXmlNode)//text(),($myXmlNode)//*,"
309+
+"($myXmlNode)/@attr, ($myXmlNode)//processing-instruction())";
310310

311311
ServerEvaluationCall evl= client.newServerEval().xquery(query1);
312312
evl.addNamespace("test", "http://marklogic.com/test")

0 commit comments

Comments
 (0)