Polishing in ExchangeResult

This commit is contained in:
Rossen Stoyanchev
2021-09-06 13:56:27 +01:00
parent 9cf8cca96d
commit 5ea7592d70

View File

@@ -56,7 +56,7 @@ import org.springframework.util.MultiValueMap;
*/ */
public class ExchangeResult { public class ExchangeResult {
private static Log logger = LogFactory.getLog(ExchangeResult.class); private static final Log logger = LogFactory.getLog(ExchangeResult.class);
private static final List<MediaType> PRINTABLE_MEDIA_TYPES = Arrays.asList( private static final List<MediaType> PRINTABLE_MEDIA_TYPES = Arrays.asList(
MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML,
@@ -77,7 +77,7 @@ public class ExchangeResult {
private final String uriTemplate; private final String uriTemplate;
@Nullable @Nullable
final Object mockServerResult; private final Object mockServerResult;
/** /**
@@ -218,9 +218,9 @@ public class ExchangeResult {
} }
/** /**
* Execute the given Runnable, catch any {@link AssertionError}, decorate * Execute the given Runnable, catch any {@link AssertionError}, log details
* with {@code AssertionError} containing diagnostic information about the * about the request and response at ERROR level under the class log
* request and response, and then re-throw. * category, and after that re-throw the error.
*/ */
public void assertWithDiagnostics(Runnable assertion) { public void assertWithDiagnostics(Runnable assertion) {
try { try {