basex - Write the unit test case for the rest service in XQUERY -
i have write unit test case rest services in xquery given in documentation have run example working fine on basex ui using test command have achieve rest service , below code not giving result. module namespace usertest = 'http://www.user.com/test'; import module namespace config = 'http://www.user.com/config' @ './module/config.xqm'; import module namespace bluser = 'http://www.user.com/user' @ './manage-users.xqm';
declare %unit:test function usertest:userinfo-test() { let $xml := <test></test> return try { unit:assert(bluser:info($xml)) } catch * { <error> <code>{ $err:code }</code> <description>{ $err:description }</description> <value>{ $err:value }</value> <module>{ $err:module }</module> <line-number>{ $err:line-number }</line-number> <column-number>{ $err:column-number }</column-number> </error> } } ;
Comments
Post a Comment