Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sort arguments of RefasterRuleCollectionTestCase#elidedTypesAndStaticImports #850

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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 @@ -17,9 +17,9 @@ final class AssertJThrowingCallableRulesTest implements RefasterRuleCollectionTe
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
assertThatExceptionOfType(Throwable.class),
assertThatIOException(),
assertThatIllegalArgumentException(),
assertThatIllegalStateException(),
assertThatIOException(),
assertThatNullPointerException());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ final class AssertJThrowingCallableRulesTest implements RefasterRuleCollectionTe
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
assertThatExceptionOfType(Throwable.class),
assertThatIOException(),
assertThatIllegalArgumentException(),
assertThatIllegalStateException(),
assertThatIOException(),
assertThatNullPointerException());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
Arrays.class,
Collections.class,
identity(),
ImmutableList.class,
ImmutableSet.class,
Stream.class,
identity());
Stream.class);
}

ImmutableSet<Comparator<String>> testNaturalOrder() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
Arrays.class,
Collections.class,
identity(),
ImmutableList.class,
ImmutableSet.class,
Stream.class,
identity());
Stream.class);
}

ImmutableSet<Comparator<String>> testNaturalOrder() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
final class EqualityRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(Objects.class, Optional.class, not(null));
return ImmutableSet.of(not(null), Objects.class, Optional.class);
}

ImmutableSet<Boolean> testPrimitiveOrReferenceEquality() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
final class EqualityRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(Objects.class, Optional.class, not(null));
return ImmutableSet.of(not(null), Objects.class, Optional.class);
}

ImmutableSet<Boolean> testPrimitiveOrReferenceEquality() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ final class ImmutableListMultimapRulesTest implements RefasterRuleCollectionTest
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
Streams.class, flatteningToImmutableListMultimap(null, null), identity());
flatteningToImmutableListMultimap(null, null), identity(), Streams.class);
}

ImmutableSet<ImmutableMultimap.Builder<String, Integer>> testImmutableListMultimapBuilder() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ final class ImmutableListMultimapRulesTest implements RefasterRuleCollectionTest
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
Streams.class, flatteningToImmutableListMultimap(null, null), identity());
flatteningToImmutableListMultimap(null, null), identity(), Streams.class);
}

ImmutableSet<ImmutableMultimap.Builder<String, Integer>> testImmutableListMultimapBuilder() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ final class ImmutableListRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
Arrays.class, Collections.class, Comparator.class, Streams.class, naturalOrder());
Arrays.class, Collections.class, Comparator.class, naturalOrder(), Streams.class);
}

ImmutableList.Builder<String> testImmutableListBuilder() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ final class ImmutableListRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
Arrays.class, Collections.class, Comparator.class, Streams.class, naturalOrder());
Arrays.class, Collections.class, Comparator.class, naturalOrder(), Streams.class);
}

ImmutableList.Builder<String> testImmutableListBuilder() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
final class ImmutableMapRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(Collections.class, Streams.class, identity());
return ImmutableSet.of(Collections.class, identity(), Streams.class);
}

ImmutableMap.Builder<String, Integer> testImmutableMapBuilder() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
final class ImmutableMapRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(Collections.class, Streams.class, identity());
return ImmutableSet.of(Collections.class, identity(), Streams.class);
}

ImmutableMap.Builder<String, Integer> testImmutableMapBuilder() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
final class ImmutableSetMultimapRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(Streams.class, flatteningToImmutableSetMultimap(null, null));
return ImmutableSet.of(flatteningToImmutableSetMultimap(null, null), Streams.class);
}

ImmutableSetMultimap.Builder<String, Integer> testImmutableSetMultimapBuilder() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
final class ImmutableSetMultimapRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(Streams.class, flatteningToImmutableSetMultimap(null, null));
return ImmutableSet.of(flatteningToImmutableSetMultimap(null, null), Streams.class);
}

ImmutableSetMultimap.Builder<String, Integer> testImmutableSetMultimapBuilder() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
final class ImmutableSetRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(Arrays.class, Collections.class, Streams.class, not(null));
return ImmutableSet.of(Arrays.class, Collections.class, not(null), Streams.class);
}

ImmutableSet.Builder<String> testImmutableSetBuilder() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
final class ImmutableSetRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(Arrays.class, Collections.class, Streams.class, not(null));
return ImmutableSet.of(Arrays.class, Collections.class, not(null), Streams.class);
}

ImmutableSet.Builder<String> testImmutableSetBuilder() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class ImmutableSortedMapRulesTest implements RefasterRuleCollectionTestCas
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
Stream.class, Streams.class, naturalOrder(), toImmutableSortedMap(null, null, null));
naturalOrder(), Stream.class, Streams.class, toImmutableSortedMap(null, null, null));
}

ImmutableSortedMap.Builder<String, Integer> testImmutableSortedMapBuilder() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ final class ImmutableSortedMapRulesTest implements RefasterRuleCollectionTestCas
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
Stream.class, Streams.class, naturalOrder(), toImmutableSortedMap(null, null, null));
naturalOrder(), Stream.class, Streams.class, toImmutableSortedMap(null, null, null));
}

ImmutableSortedMap.Builder<String, Integer> testImmutableSortedMapBuilder() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,17 +19,17 @@ final class JUnitToAssertJRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
Assertions.class,
assertDoesNotThrow(() -> null),
assertInstanceOf(null, null),
assertThrows(null, null),
assertThrowsExactly(null, null),
(Runnable) () -> assertFalse(true),
(Runnable) () -> assertNotNull(null),
(Runnable) () -> assertNotSame(null, null),
(Runnable) () -> assertNull(null),
(Runnable) () -> assertSame(null, null),
(Runnable) () -> assertTrue(true));
(Runnable) () -> assertTrue(true),
assertDoesNotThrow(() -> null),
assertInstanceOf(null, null),
Assertions.class,
assertThrows(null, null),
assertThrowsExactly(null, null));
}

void testThrowNewAssertionError() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ final class JUnitToAssertJRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
Assertions.class,
assertDoesNotThrow(() -> null),
assertInstanceOf(null, null),
assertThrows(null, null),
assertThrowsExactly(null, null),
(Runnable) () -> assertFalse(true),
(Runnable) () -> assertNotNull(null),
(Runnable) () -> assertNotSame(null, null),
(Runnable) () -> assertNull(null),
(Runnable) () -> assertSame(null, null),
(Runnable) () -> assertTrue(true));
(Runnable) () -> assertTrue(true),
assertDoesNotThrow(() -> null),
assertInstanceOf(null, null),
Assertions.class,
assertThrows(null, null),
assertThrowsExactly(null, null));
}

void testThrowNewAssertionError() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ final class ReactorRulesTest implements RefasterRuleCollectionTestCase {
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
ArrayList.class,
assertThat(0),
Collection.class,
HashMap.class,
List.class,
ImmutableCollection.class,
ImmutableMap.class,
assertThat(0),
List.class,
maxBy(null),
minBy(null),
naturalOrder(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ final class ReactorRulesTest implements RefasterRuleCollectionTestCase {
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
ArrayList.class,
assertThat(0),
Collection.class,
HashMap.class,
List.class,
ImmutableCollection.class,
ImmutableMap.class,
assertThat(0),
List.class,
maxBy(null),
minBy(null),
naturalOrder(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,22 +43,22 @@ final class StreamRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
ImmutableList.class,
ImmutableMap.class,
List.class,
Map.class,
Objects.class,
Streams.class,
collectingAndThen(null, null),
counting(),
filtering(null, null),
flatMapping(null, null),
identity(),
ImmutableList.class,
ImmutableMap.class,
List.class,
Map.class,
mapping(null, null),
maxBy(null),
minBy(null),
not(null),
Objects.class,
reducing(null),
Streams.class,
summarizingDouble(null),
summarizingInt(null),
summarizingLong(null),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,22 @@ final class StreamRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
ImmutableList.class,
ImmutableMap.class,
List.class,
Map.class,
Objects.class,
Streams.class,
collectingAndThen(null, null),
counting(),
filtering(null, null),
flatMapping(null, null),
identity(),
ImmutableList.class,
ImmutableMap.class,
List.class,
Map.class,
mapping(null, null),
maxBy(null),
minBy(null),
not(null),
Objects.class,
reducing(null),
Streams.class,
summarizingDouble(null),
summarizingInt(null),
summarizingLong(null),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ final class StringRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
Arrays.class, Joiner.class, Objects.class, Stream.class, Streams.class, joining(), UTF_8);
UTF_8, Arrays.class, Joiner.class, joining(), Objects.class, Stream.class, Streams.class);
}

ImmutableSet<Boolean> testStringIsEmpty() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ final class StringRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(
Arrays.class, Joiner.class, Objects.class, Stream.class, Streams.class, joining(), UTF_8);
UTF_8, Arrays.class, Joiner.class, joining(), Objects.class, Stream.class, Streams.class);
}

ImmutableSet<Boolean> testStringIsEmpty() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
final class WebClientRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(fromValue(""), GET, HEAD, OPTIONS, PATCH, POST, PUT);
return ImmutableSet.of(GET, HEAD, OPTIONS, PATCH, POST, PUT, fromValue(""));
}

ImmutableSet<?> testBodyValue() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
final class WebClientRulesTest implements RefasterRuleCollectionTestCase {
@Override
public ImmutableSet<Object> elidedTypesAndStaticImports() {
return ImmutableSet.of(fromValue(""), GET, HEAD, OPTIONS, PATCH, POST, PUT);
return ImmutableSet.of(GET, HEAD, OPTIONS, PATCH, POST, PUT, fromValue(""));
}

ImmutableSet<?> testBodyValue() {
Expand Down
5 changes: 5 additions & 0 deletions refaster-test-support/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@
</dependency>
<!-- XXX: Explicitly declared as a workaround for
https://github.com/pitest/pitest-junit5-plugin/issues/105. -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
Expand Down
Loading