Skip to content

Commit

Permalink
Update AssertJ
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-krecan committed Dec 31, 2023
1 parent 8ce3fb3 commit 6890d4c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
import org.assertj.core.api.AbstractAssert;
import org.assertj.core.api.FactoryBasedNavigableListAssert;
import org.assertj.core.api.InstanceOfAssertFactory;
import org.assertj.core.description.Description;
import org.assertj.core.error.BasicErrorMessageFactory;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
Expand All @@ -44,7 +45,7 @@ public class JsonListAssert extends FactoryBasedNavigableListAssert<JsonListAsse
@Override
@NotNull
public JsonListAssert isEqualTo(@Nullable Object expected) {
describedAs(null);
describedAs((Description) null);
Diff diff = createDiff(expected);
diff.failIfDifferent();
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@
*/
package net.javacrumbs.jsonunit.assertj;

import net.javacrumbs.jsonunit.core.Configuration;
import net.javacrumbs.jsonunit.core.internal.Diff;
import net.javacrumbs.jsonunit.core.internal.Node;
import net.javacrumbs.jsonunit.core.internal.Path;
import org.assertj.core.api.AbstractMapAssert;
import org.assertj.core.description.Description;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.stream.Collectors;

import static java.util.Arrays.stream;
import static java.util.Objects.deepEquals;
import static java.util.stream.Collectors.toList;
Expand All @@ -28,18 +42,6 @@
import static org.assertj.core.error.ShouldNotContainValue.shouldNotContainValue;
import static org.assertj.core.util.Arrays.array;

import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.stream.Collectors;
import net.javacrumbs.jsonunit.core.Configuration;
import net.javacrumbs.jsonunit.core.internal.Diff;
import net.javacrumbs.jsonunit.core.internal.Node;
import net.javacrumbs.jsonunit.core.internal.Path;
import org.assertj.core.api.AbstractMapAssert;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

public class JsonMapAssert extends AbstractMapAssert<JsonMapAssert, Map<String, Object>, String, Object> {
private final Configuration configuration;
private final Path path;
Expand Down Expand Up @@ -281,7 +283,7 @@ private UnsupportedOperationException unsupportedOperation() {

@NotNull
private JsonMapAssert compare(@Nullable Object other, @NotNull Configuration configuration) {
describedAs(null);
describedAs((Description) null);
Diff diff = Diff.create(other, actual, "fullJson", path, configuration);
diff.failIfDifferent();
return this;
Expand Down

0 comments on commit 6890d4c

Please sign in to comment.