Author: midon
Date: Thu Jul 10 12:36:51 2008
New Revision: 675693
URL: http://svn.apache.org/viewvc?rev=675693&view=rev
Log:
make the test more robust: check the message type so that it fails if the fault
is not caught properly
Modified:
ode/branches/APACHE_ODE_1.1/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java
Modified:
ode/branches/APACHE_ODE_1.1/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java
URL:
http://svn.apache.org/viewvc/ode/branches/APACHE_ODE_1.1/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java?rev=675693&r1=675692&r2=675693&view=diff
==============================================================================
---
ode/branches/APACHE_ODE_1.1/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java
(original)
+++
ode/branches/APACHE_ODE_1.1/axis2-war/src/test/java/org/apache/ode/axis2/ServiceFaultCatchTest.java
Thu Jul 10 12:36:51 2008
@@ -12,13 +12,12 @@
String bundleName = "TestStructuredFault";
// deploy the required service
server.deployService(DummyService.class.getCanonicalName());
- if (!server.isDeployed(bundleName)) server.deployProcess(bundleName);
-
+ if (server.isDeployed(bundleName)) server.undeployProcess(bundleName);
+ server.deployProcess(bundleName);
try {
String response =
server.sendRequestFile("http://localhost:8080/processes/helloWorld",
bundleName, "testRequest.soap");
-
- assertTrue(response.indexOf("Something went wrong. Fortunately, it
was meant to be.") >= 0);
+ assertTrue(response.contains("helloResponse") &&
response.contains("Something went wrong. Fortunately, it was meant to be."));
} finally {
server.undeployProcess(bundleName);
}