Polish "Improve exception message when subsection is empty array"

See gh-732
This commit is contained in:
Andy Wilkinson
2021-06-14 21:12:02 +01:00
parent cbe6d775f3
commit 6c0960d304
2 changed files with 4 additions and 4 deletions

View File

@@ -184,11 +184,11 @@ public class FieldPathPayloadSubsectionExtractorTests {
}
@Test
public void extractEmptySubsection() throws JsonParseException, JsonMappingException, IOException {
public void extractEmptyArraySubsection() throws JsonParseException, JsonMappingException, IOException {
assertThatThrownBy(() -> new FieldPathPayloadSubsectionExtractor("a")
.extractSubsection("{\"a\":[]}}".getBytes(), MediaType.APPLICATION_JSON))
.isInstanceOf(PayloadHandlingException.class)
.hasMessage("a identifies a section of payload, but the section is empty");
.isInstanceOf(PayloadHandlingException.class)
.hasMessage("a identifies an empty section of the payload");
}
}