From ecb15ac58b01635e418763ea68f19313a8dc3d73 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Fri, 14 Aug 2015 17:04:34 +0200 Subject: [PATCH] Polish assertion msgs in JsonPathExpectationsHelper --- .../test/util/JsonPathExpectationsHelper.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spring-test/src/main/java/org/springframework/test/util/JsonPathExpectationsHelper.java b/spring-test/src/main/java/org/springframework/test/util/JsonPathExpectationsHelper.java index 11b01129652..7f0cc47d0fc 100644 --- a/spring-test/src/main/java/org/springframework/test/util/JsonPathExpectationsHelper.java +++ b/spring-test/src/main/java/org/springframework/test/util/JsonPathExpectationsHelper.java @@ -135,7 +135,7 @@ public class JsonPathExpectationsHelper { */ public void assertValueIsString(String content) throws ParseException { Object value = assertExistsAndReturn(content); - String reason = "Expected string at JSON path " + this.expression + " but found " + value; + String reason = "Expected string at JSON path \"" + this.expression + "\" but found " + value; assertThat(reason, value, instanceOf(String.class)); } @@ -147,7 +147,7 @@ public class JsonPathExpectationsHelper { */ public void assertValueIsBoolean(String content) throws ParseException { Object value = assertExistsAndReturn(content); - String reason = "Expected boolean at JSON path " + this.expression + " but found " + value; + String reason = "Expected boolean at JSON path \"" + this.expression + "\" but found " + value; assertThat(reason, value, instanceOf(Boolean.class)); } @@ -159,7 +159,7 @@ public class JsonPathExpectationsHelper { */ public void assertValueIsNumber(String content) throws ParseException { Object value = assertExistsAndReturn(content); - String reason = "Expected number at JSON path " + this.expression + " but found " + value; + String reason = "Expected number at JSON path \"" + this.expression + "\" but found " + value; assertThat(reason, value, instanceOf(Number.class)); } @@ -182,7 +182,7 @@ public class JsonPathExpectationsHelper { */ public void assertValueIsMap(String content) throws ParseException { Object value = assertExistsAndReturn(content); - String reason = "Expected map at JSON path " + this.expression + " but found " + value; + String reason = "Expected map at JSON path \"" + this.expression + "\" but found " + value; assertThat(reason, value, instanceOf(Map.class)); }