use of org.apache.cxf.systest.ws.addr_fromjava.client.AddNumbersException_Exception in project cxf by apache.
the class WSAFromJavaTest method testAddNumbersFault.
@Test
public void testAddNumbersFault() throws Exception {
ByteArrayOutputStream input = setupInLogging();
ByteArrayOutputStream output = setupOutLogging();
AddNumberImpl port = getPort();
try {
port.addNumbers(-1, 2);
} catch (AddNumbersException_Exception e) {
assert true;
} catch (Exception e) {
e.printStackTrace();
assert false;
}
assertTrue(output.toString().indexOf("http://cxf.apache.org/input") != -1);
String expectedFault = "http://server.addr_fromjava.ws.systest.cxf.apache.org/AddNumberImpl/" + "addNumbers/Fault/AddNumbersException";
assertTrue(input.toString(), input.toString().indexOf(expectedFault) != -1);
}
use of org.apache.cxf.systest.ws.addr_fromjava.client.AddNumbersException_Exception in project cxf by apache.
the class WSAFromJavaTest method testAddNumbers3Fault.
@Test
public void testAddNumbers3Fault() throws Exception {
ByteArrayOutputStream input = setupInLogging();
ByteArrayOutputStream output = setupOutLogging();
AddNumberImpl port = getPort();
try {
port.addNumbers3(-1, 2);
} catch (AddNumbersException_Exception e) {
assert true;
} catch (Exception e) {
e.printStackTrace();
assert false;
}
assertTrue(output.toString(), output.toString().indexOf("http://cxf.apache.org/input") != -1);
assertTrue(input.toString(), input.toString().indexOf("http://cxf.apache.org/fault3") != -1);
}
Aggregations