Skip to content

Commit

Permalink
Add additional test cases to isUnmodifiable
Browse files Browse the repository at this point in the history
  • Loading branch information
scordio committed Oct 23, 2021
1 parent 1ef67e0 commit 05d979e
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
import org.apache.commons.collections4.set.UnmodifiableSet;
import org.apache.commons.collections4.set.UnmodifiableSortedSet;
import org.assertj.core.error.ErrorMessageFactory;
import org.assertj.core.test.jdk11.Jdk11;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.params.ParameterizedTest;
import org.junit.jupiter.params.provider.Arguments;
Expand Down Expand Up @@ -109,6 +110,10 @@ private static Stream<Collection<?>> unmodifiableCollections() {
ImmutableList.of(new Object()),
ImmutableSet.of(new Object()),
ImmutableSortedSet.of("element"),
Jdk11.List.of("element"), // same implementation as List.of(E, E)
Jdk11.List.of("element", "element", "element"), // different implementation from List.of(E) and List.of(E, E)
Jdk11.Set.of("element"), // same implementation as Set.of(E, E)
Jdk11.Set.of("element1", "element2", "element3"), // different implementation from Set.of(E) and Set.of(E, E)
Sets.unmodifiableNavigableSet(newTreeSet("element")),
UnmodifiableCollection.unmodifiableCollection(list(new Object())),
UnmodifiableList.unmodifiableList(list(new Object())),
Expand Down

0 comments on commit 05d979e

Please sign in to comment.