Skip to content

Releases: openrewrite/rewrite-testing-frameworks

3.50.0

Choose a tag to compare

@code-genome-project-ci code-genome-project-ci released this 27 Oct 02:12
55b8562

What's Changed

  • Fixes Mockito getting PowerMock's version from parent pom properties and Gradle version variables by @sambsnyd in #1198
  • Keep the method type in sync with the return type in ConvertToRawType by @knutwannheden in #1202
  • Use ListUtils.filter instead of mapping elements to null by @timtebeek in #1203
  • Only add the Mockito type import when spying statically by @timtebeek in #1204
  • Upgrade to Gradle 9.8.2 by @jkschneider in #1206
  • Always import the class mocked by MockitoWhenOnStaticToMockStatic by @Jammy-Louie in #1208
  • Let rewriteRun verify the JUnit 4 to 5 migration settles by @knutwannheden in #1209
  • Mockito, JMockit and JUnit recipes remove or type the imports they leave unused by @knutwannheden in #1210
  • Only drop a literal zero delta in AssertEqualsIntegralDeltaToAssertEquals by @timtebeek in #1212
  • Track Hamcrest not(..) negation locally instead of on the ExecutionContext by @timtebeek in #1214
  • Only adopt hasSeconds for isEqualTo in AdoptAssertJDurationAssertions by @timtebeek in #1215
  • Leave tests that call assumptions alone in TestsShouldIncludeAssertions by @timtebeek in #1213
  • Keep JUnit deltas when converting assertEquals, assertNotEquals and assertArrayEquals to AssertJ by @timtebeek in #1216
  • Only turn the WireMockRule field's @Rule into @RegisterExtension in UseWiremockExtension by @timtebeek in #1218
  • Keep early returns in TestMethodsShouldBeVoid and KotlinTestMethodsShouldReturnUnit by @timtebeek in #1217
  • Use JavaFileChecker preconditions instead of isAcceptable overrides by @timtebeek in #1219
  • Only convert Java sources in UseAssertSame by @timtebeek in #1223
  • Only convert assertInstanceOf used as a statement in JUnitAssertInstanceOfToAssertThat by @timtebeek in #1222
  • Only remove a direct PowerMockTestCase or PowerMockConfiguration superclass in RemovePowerMockClassExtensions by @timtebeek in #1224
  • Only replace assertNotEquals(false, <boolean>) when the second argument is a primitive boolean by @timtebeek in #1220
  • Only migrate the two-argument InvocationInterceptor.interceptDynamicTest in RemoveInterceptDynamicTest by @timtebeek in #1221
  • Hoist matchers created per visit to private static final constants by @timtebeek in #1225
  • Use the Comments trait and ListUtils/reduce instead of hand-built comments and manual list handling by @timtebeek in #1226
  • Add UsesMethod and UsesType preconditions to recipes that visit every file by @timtebeek in #1227
  • Fix typos, over-claiming and inconsistent recipe display names and descriptions by @timtebeek in #1231
  • Remove stale @Disabled tests, //noinspection lines and restating comments by @timtebeek in #1233
  • Use MethodMatcher, AnnotationMatcher and variable types instead of name strings by @timtebeek in #1228
  • Align test names with recipes, group no-change tests and tidy classpath entries and YAML by @timtebeek in #1235
  • Drop forced maybeAddImport(.., false) where templates already attribute the added types by @timtebeek in #1234
  • Run unconditional sub-recipes from getRecipeList() and keep cleanups local to the changed element by @timtebeek in #1230
  • Tighten preconditions that were too broad or too narrow by @timtebeek in #1229
  • Drop contextSensitive() from self-contained JavaTemplates by @timtebeek in #1232
  • Support Gradle Kotlin DSL in GradleUseJunitJupiter and AddJupiterDependencies by @timtebeek in #1238
  • Create a unique folder for no-argument TemporaryFolder#newFolder() by @timtebeek in #1237
  • Skip Hamcrest matchers that take nested matchers in HamcrestMatcherToAssertJ by @timtebeek in #1236
  • Add junit-jupiter-migrationsupport where the JUnit 4 migration uses it, and only remove it once unused by @timtebeek in #1239
  • Keep the message overloads of TestNG assertThrows/expectThrows in TestNgAssertThrowsToAssertThat by @timtebeek in #1240
  • Keep isNotEmpty() and isNotNull() guards in SimplifyRedundantAssertJChains when the next assertion passes without them by @timtebeek in #1241
  • Only replace @CsvSource values that CSV parsing leaves unchanged in CsvSourceToValueSource by @timtebeek in #1244
  • Only use hasSameSizeAs in SimplifyHasSizeAssertion when the assert type has a matching overload by @timtebeek in #1243
  • Only collapse the JRE range of the visited method in MinimumJreConditions by @timtebeek in #1242
  • Preserve comments before collapsed AssertJ chains by @martinfrancois in #1096
  • Respect composed JUnit test templates by @martinfrancois in #1093
  • Keep @Timeout attributes and only convert whole minutes in ImplausibleTimeoutToMinutes by @tashen247 in #1245
  • Find test classes without tests by @Jammy-Louie in #1205
  • Preserve inherited lifecycle method visibility in TestsShouldNotBePublic by @jkschneider in #1247
  • Preserve public test fixtures referenced from other packages by @jkschneider in #1248

New Contributors

Full Changelog: v3.49.1...v3.50.0

v3.49.1

Choose a tag to compare

@sambsnyd sambsnyd released this 19 Oct 17:17
143951e

What's Changed

  • WireMock 4 migration: move Jetty EE10 to EE11 and bump to 4.0.0-beta.40 by @sullis in #1184
  • Add mockito-junit-jupiter when PowerMockRunner becomes MockitoExtension by @timtebeek in #1185
  • Override a Spring Boot BOM-managed Mockito when replacing PowerMock by @timtebeek in #1186
  • Keep WireMockRule used as a server a WireMockServer; port() to getPort() by @timtebeek in #1187
  • Expect blank line before static imports after whenNew migration by @timtebeek in #1192
  • Test on Java 21 and 25 through additional_test_java_versions by @timtebeek in #1194
  • Match Mockito and JUnit code by type, and format only what changes by @jkschneider in #1195
  • Give the when(instance) call built inside the replaced call ids of its own by @jkschneider in #1196
  • Declare what templates name and build trees as the parser does by @jkschneider in #1197
  • Pin Datafaker to 1.x when migrating from Java Faker by @timtebeek in #1199
  • Bump wiremock-core parser classpath and keep the class prefix when removing PowerMock runners by @timtebeek in #1201

Full Changelog: v3.49.0...v3.49.1

3.49.0

Choose a tag to compare

@bryceatmoderne bryceatmoderne released this 09 Oct 20:39
f05953a

What's Changed

  • Run the full Cucumber-JVM 7.x upgrade from JUnit4to5Migration by @timtebeek in #1181
  • Upgrade WireMock to the latest 2.x in JUnit4to5Migration by @timtebeek in #1182

Full Changelog: v3.48.2...v3.49.0

3.48.2

Choose a tag to compare

@greg-at-moderne greg-at-moderne released this 09 Oct 12:04
95cb51a

What's Changed

Full Changelog: v3.48.1...v3.48.2

v3.48.1

Choose a tag to compare

@timtebeek timtebeek released this 08 Oct 17:19
eaabc1d

What's Changed

  • Run the Cucumber JUnit Platform suite migration from JUnit4to5Migration by @timtebeek in #1178

Full Changelog: v3.48.0...v3.48.1

v3.48.0

Choose a tag to compare

@timtebeek timtebeek released this 07 Oct 14:12
77437ba

What's Changed

  • Add junit-jupiter when only junit.framework.TestCase is used by @manduinca in #1117
  • Replace PowerMockRunner with the lenient MockitoJUnitRunner.Silent by @timtebeek in #1131
  • Skip MockitoWhenOnStaticToMockStatic for tests still on PowerMock by @timtebeek in #1132
  • Remove PowerMockRule and remaining PowerMock calls and annotations by @timtebeek in #1133
  • Reflect on the declaring class when migrating Whitebox calls by @timtebeek in #1134
  • Mockito1to3Migration: rename anyXOf matchers called through org.mockito.Mockito by @mohitduhan19 in #1130
  • Migrate Whitebox calls nested in expressions and named by constants by @timtebeek in #1135
  • Replace parent-managed PowerMock with the Mockito artifact its modules use by @timtebeek in #1138
  • Keep migrated static mocks scoped like PowerMock's by @timtebeek in #1136
  • Add WireMock 3 to 4 migration recipe by @sullis in #1122
  • Keep whenNew stubbing and scope when migrating to construction mocks by @timtebeek in #1137
  • Preserve parameterized toString assertions by @martinfrancois in #1094
  • Leave repositories with unmigratable PowerMock usage on PowerMock and flag that usage by @timtebeek in #1140
  • Preserve element-specific assertions in sequenced collections by @martinfrancois in #1095
  • Upgrade an explicit mockito-core along with the Mockito that replaces PowerMock by @timtebeek in #1141
  • Flag Whitebox calls when the class declaring the accessed member is unknown by @timtebeek in #1142
  • PowerMock → Mockito migration enhancements by @sambsnyd in #1143
  • Cache GradleUseJunitJupiter's parsed template on the root cursor by @timtebeek in #1147
  • Add JUnit 4 where the PowerMock JUnit 4 module provided it by @timtebeek in #1151
  • Keep imports that migrated PowerMock code still needs by @timtebeek in #1149
  • Reuse an existing MockedStatic for static stubbing in setup methods by @timtebeek in #1150
  • Disable unsupported PowerMock tests before migrating them by @timtebeek in #1148
  • RemoveDoNothingForDefaultMocks removes imports only the deleted stub used by @jkschneider in #1154
  • MockitoJUnitToMockitoExtension migrates only MockitoRule fields annotated with @Rule by @jkschneider in #1155
  • UseMockitoExtension adds mockito-junit-jupiter for migrated MockitoRule fields by @jkschneider in #1156
  • UseMockitoExtension adds mockito-junit-jupiter at the module's Mockito version by @jkschneider in #1157
  • AddHamcrestIfUsed adds Hamcrest for any Hamcrest use, including matchers the ExpectedException migration generates by @jkschneider in #1158
  • AddJupiterDependencies declares the Jupiter API directly in Maven modules that run dependency:analyze by @jkschneider in #1159
  • The JUnit 4 migration adds @Nested only inside @RunWith(Enclosed.class) suites by @jkschneider in #1160
  • The JUnit 4 migration keeps JUnit 4 on the classpath of modules that use Guava testlib by @jkschneider in #1161
  • MigrateJUnitTestCase: leave TestCase subclasses overriding run(TestResult) untouched by @mohitduhan19 in #1168
  • Migrate System Rules to System Stubs and JUnit Pioneer by @timtebeek in #1152
  • JUnit5to6Migration renames ExtensionContext.Store.getOrComputeIfAbsent to computeIfAbsent by @timtebeek in #1171
  • Exclude a transitive mockito-all when replacing PowerMock by @jkschneider in #1172
  • Leave a declared JUnit 4 at its version when replacing PowerMock by @jkschneider in #1173
  • Place AssertJ descriptions and failure messages before the assertion by @timtebeek in #1170
  • Skip JUnit 6 build changes in modules that use TestNG by @timtebeek in #1177
  • ReplacePowerMockito: fix duplicate and shadowed Mockito dependencies by @sambsnyd in #1176

New Contributors

Full Changelog: v3.47.0...v3.48.0

3.47.0

Choose a tag to compare

@Jammy-Louie Jammy-Louie released this 23 Sep 17:33
a389d72

What's Changed

Full Changelog: v3.46.0...v3.47.0

3.46.0

Choose a tag to compare

@Jammy-Louie Jammy-Louie released this 09 Sep 17:11
d2c7027

What's Changed

  • Resolve org.openrewrite build plugins from the Code Genome Project by @kmccarp in #1116

Full Changelog: v3.45.0...v3.46.0

3.45.0

Choose a tag to compare

@timtebeek timtebeek released this 26 Aug 18:23
4a83094

What's Changed

  • Name the JUnit, cleanup, WireMock and Byteman categories by @jkschneider in #1091
  • Regenerate recipes.csv so the new category descriptions land by @jkschneider in #1092
  • ExpectedExceptionToAssertThrows: inline single-use reassigned locals by @neil-mushell in #1074
  • Migrate anyCollectionOf/anyIterableOf to their no-arg replacements by @timtebeek in #1100
  • Retain doNothing() for spies and partial mocks by @timtebeek in #1101
  • Remove now-invalid @Override when migrating TestCase subclasses by @timtebeek in #1104
  • Migrate AssertJ @Rule soft assertions to SoftAssertionsExtension by @timtebeek in #1105
  • Retain the original stubbing method when rewriting static when to MockedStatic by @timtebeek in #1106
  • test: add for final TestName Rule by @cortlepp in #1109

Full Changelog: v3.44.0...v3.45.0

3.44.0

Choose a tag to compare

@timtebeek timtebeek released this 12 Aug 17:20
23a04ef

What's Changed

  • Use assertInstanceOf for expectCause(isA/instanceOf/is(X.class)) by @neil-mushell in #1069
  • Make subpackage recursion explicit in the JavaFaker and Fest renames by @timtebeek in #1072
  • Handle MockitoJUnitRunner.StrictStubs in MockitoJUnitRunnerToExtension by @timtebeek in #1079
  • Retain assertTrue/assertFalse(a.equals(null)) as is by @timtebeek in #1075
  • Emit threadMode = SEPARATE_THREAD when migrating @Test(timeout = N) by @timtebeek in #1076
  • Add a blank line after the mocks field generated in Kotlin sources by @MBoegers in #1070
  • Do not convert constructors of types nested in a parameterized test class by @timtebeek in #1081
  • Keep static on nested test classes with static members before Java 16 by @martinfrancois in #1082
  • Do not wrap class level mockStatic fields in try-with-resources by @timtebeek in #1089
  • Fix UpdateMockWebServerMockResponseTest expectation by @timtebeek in #1090

New Contributors

Full Changelog: v3.43.0...v3.44.0