Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,11 @@
import org.assertj.core.api.AbstractAssert;
import org.assertj.core.api.AbstractBooleanAssert;
import org.assertj.core.api.AbstractCharSequenceAssert;
import org.assertj.core.api.AbstractListAssert;
import org.assertj.core.api.AbstractMapAssert;
import org.assertj.core.api.AbstractObjectAssert;
import org.assertj.core.api.Assert;
import org.assertj.core.api.Assertions;
import org.assertj.core.api.ObjectAssert;
import org.assertj.core.api.ListAssert;
import org.assertj.core.api.MapAssert;
import org.skyscreamer.jsonassert.JSONCompare;
import org.skyscreamer.jsonassert.JSONCompareMode;
import org.skyscreamer.jsonassert.JSONCompareResult;
Expand Down Expand Up @@ -947,11 +946,12 @@ public AbstractBooleanAssert<?> extractingJsonPathBooleanValue(
* @param expression the {@link JsonPath} expression
* @param args arguments to parameterize the {@code JsonPath} expression with, using
* formatting specifiers defined in {@link String#format(String, Object...)}
* @param <E> element type
* @return a new assertion object whose object under test is the extracted item
* @throws AssertionError if the path is not valid or does not result in an array
*/
@SuppressWarnings("unchecked")
public AbstractListAssert<?, ?, Object, ObjectAssert<Object>> extractingJsonPathArrayValue(
public <E> ListAssert<E> extractingJsonPathArrayValue(
CharSequence expression, Object... args) {
return Assertions.assertThat(
extractingJsonPathValue(expression, args, List.class, "an array"));
Expand All @@ -961,12 +961,14 @@ public AbstractBooleanAssert<?> extractingJsonPathBooleanValue(
* Extract the map value at the given JSON path for further object assertions.
* @param expression the {@link JsonPath} expression
* @param args arguments to parameterize the {@code JsonPath} expression with, using
* @param <K> key type
* @param <V> value type
* formatting specifiers defined in {@link String#format(String, Object...)}
* @return a new assertion object whose object under test is the extracted item
* @throws AssertionError if the path is not valid or does not result in a map
*/
@SuppressWarnings("unchecked")
public AbstractMapAssert<?, ?, Object, Object> extractingJsonPathMapValue(
public <K, V> MapAssert<K, V> extractingJsonPathMapValue(
CharSequence expression, Object... args) {
return Assertions.assertThat(
extractingJsonPathValue(expression, args, Map.class, "a map"));
Expand Down