Skip to content

Commit ef6c400

Browse files
committed
noFault() now reports fault message
1 parent 458bf1c commit ef6c400

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/src/main/java/org/springframework/ws/test/server/ResponseMatchers.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
import org.springframework.ws.test.support.matcher.SoapHeaderMatcher;
3333
import org.springframework.xml.transform.ResourceSource;
3434

35-
import static org.springframework.ws.test.support.AssertionErrors.assertTrue;
35+
import static org.springframework.ws.test.support.AssertionErrors.fail;
3636

3737
/**
3838
* Factory methods for {@link ResponseMatcher} classes. Typically used to provide input for {@link
@@ -125,7 +125,9 @@ public void match(WebServiceMessage request, WebServiceMessage response)
125125
throws IOException, AssertionError {
126126
if (response instanceof FaultAwareWebServiceMessage) {
127127
FaultAwareWebServiceMessage faultMessage = (FaultAwareWebServiceMessage) response;
128-
assertTrue("Response has a SOAP Fault", !faultMessage.hasFault());
128+
if (faultMessage.hasFault()) {
129+
fail("Response has a SOAP Fault: \"" + faultMessage.getFaultReason() + "\"");
130+
}
129131
}
130132
}
131133

0 commit comments

Comments
 (0)