Exemplo n.º 1
0
 /**
  * Test sending of HTTP request without any attributes - error shall be thrown that mandatory
  * attributes are missing.
  */
 @Test
 public void sendEmptyReq() {
   try {
     new XQuery(_HTTP_SEND_REQUEST.args("<http:request/>")).execute(ctx);
   } catch (final BaseXException ex) {
     assertTrue(ex.getMessage().contains(ErrType.HC.toString()));
   }
 }
Exemplo n.º 2
0
 /** Tests http:send-request((),()). */
 @Test
 public void sendReqNoParams() {
   final Command cmd = new XQuery(_HTTP_SEND_REQUEST.args("()"));
   try {
     cmd.execute(ctx);
   } catch (final BaseXException ex) {
     assertTrue(ex.getMessage().contains(ErrType.HC.toString()));
   }
 }