Exemplo n.º 1
0
 @Test
 public void testAssertXPath() throws Exception {
   client
       .sendRequestTo(ENDPOINT_URL, withMessage("request1.xml"))
       .andExpect(noFault())
       .andExpect(xpath("//ns:from/ns:code", NS_MAP).evaluatesTo("PRG"));
 }
Exemplo n.º 2
0
 @Test
 public void testValidateResponse() throws Exception {
   client
       .sendRequestTo(ENDPOINT_URL, withMessage("request1.xml"))
       .andExpect(noFault())
       .andExpect(validPayload(resource("xsd/messages.xsd")));
 }
Exemplo n.º 3
0
 @Test
 public void testResponseTemplate() throws Exception {
   client
       .sendRequestTo(
           ENDPOINT_URL,
           withMessage("request-context-xslt.xml").withParameter("serviceClass", "first"))
       .andExpect(message("response-context-xslt.xml").withParameter("serviceClass", "first"));
 }
Exemplo n.º 4
0
 @Test
 public void testErrorMessage() throws Exception {
   client
       .sendRequestTo(ENDPOINT_URL, withMessage("request-error.xml"))
       .andExpect(serverOrReceiverFault("Departure and destination airport has to differ."));
 }
Exemplo n.º 5
0
 @Test
 public void testError() throws Exception {
   client
       .sendRequestTo(ENDPOINT_URL, withMessage("request-error.xml"))
       .andExpect(message("response-error.xml"));
 }
Exemplo n.º 6
0
 @Test
 public void testCompare() throws Exception {
   client
       .sendRequestTo(ENDPOINT_URL, withMessage("request1.xml"))
       .andExpect(message("response1.xml"));
 }
Exemplo n.º 7
0
 @Test
 public void testSimple() throws Exception {
   client.sendRequestTo(ENDPOINT_URL, withMessage("request1.xml")).andExpect(noFault());
 }