Repository navigation
Releases: openrewrite/rewrite-testing-frameworks
Releases · openrewrite/rewrite-testing-frameworks
Release list
3.50.0
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.filterinstead of mapping elements tonullby @timtebeek in #1203 - Only add the
Mockitotype import when spying statically by @timtebeek in #1204 - Upgrade to Gradle 9.8.2 by @jkschneider in #1206
- Always import the class mocked by
MockitoWhenOnStaticToMockStaticby @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
AssertEqualsIntegralDeltaToAssertEqualsby @timtebeek in #1212 - Track Hamcrest
not(..)negation locally instead of on theExecutionContextby @timtebeek in #1214 - Only adopt
hasSecondsforisEqualToinAdoptAssertJDurationAssertionsby @timtebeek in #1215 - Leave tests that call assumptions alone in
TestsShouldIncludeAssertionsby @timtebeek in #1213 - Keep JUnit deltas when converting
assertEquals,assertNotEqualsandassertArrayEqualsto AssertJ by @timtebeek in #1216 - Only turn the
WireMockRulefield's@Ruleinto@RegisterExtensioninUseWiremockExtensionby @timtebeek in #1218 - Keep early returns in
TestMethodsShouldBeVoidandKotlinTestMethodsShouldReturnUnitby @timtebeek in #1217 - Use
JavaFileCheckerpreconditions instead ofisAcceptableoverrides by @timtebeek in #1219 - Only convert Java sources in
UseAssertSameby @timtebeek in #1223 - Only convert
assertInstanceOfused as a statement inJUnitAssertInstanceOfToAssertThatby @timtebeek in #1222 - Only remove a direct
PowerMockTestCaseorPowerMockConfigurationsuperclass inRemovePowerMockClassExtensionsby @timtebeek in #1224 - Only replace
assertNotEquals(false, <boolean>)when the second argument is a primitivebooleanby @timtebeek in #1220 - Only migrate the two-argument
InvocationInterceptor.interceptDynamicTestinRemoveInterceptDynamicTestby @timtebeek in #1221 - Hoist matchers created per visit to
private static finalconstants by @timtebeek in #1225 - Use the
Commentstrait andListUtils/reduceinstead of hand-built comments and manual list handling by @timtebeek in #1226 - Add
UsesMethodandUsesTypepreconditions 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
@Disabledtests,//noinspectionlines and restating comments by @timtebeek in #1233 - Use
MethodMatcher,AnnotationMatcherand 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-containedJavaTemplates by @timtebeek in #1232 - Support Gradle Kotlin DSL in
GradleUseJunitJupiterandAddJupiterDependenciesby @timtebeek in #1238 - Create a unique folder for no-argument
TemporaryFolder#newFolder()by @timtebeek in #1237 - Skip Hamcrest matchers that take nested matchers in
HamcrestMatcherToAssertJby @timtebeek in #1236 - Add
junit-jupiter-migrationsupportwhere the JUnit 4 migration uses it, and only remove it once unused by @timtebeek in #1239 - Keep the message overloads of TestNG
assertThrows/expectThrowsinTestNgAssertThrowsToAssertThatby @timtebeek in #1240 - Keep
isNotEmpty()andisNotNull()guards inSimplifyRedundantAssertJChainswhen the next assertion passes without them by @timtebeek in #1241 - Only replace
@CsvSourcevalues that CSV parsing leaves unchanged inCsvSourceToValueSourceby @timtebeek in #1244 - Only use
hasSameSizeAsinSimplifyHasSizeAssertionwhen the assert type has a matching overload by @timtebeek in #1243 - Only collapse the JRE range of the visited method in
MinimumJreConditionsby @timtebeek in #1242 - Preserve comments before collapsed AssertJ chains by @martinfrancois in #1096
- Respect composed JUnit test templates by @martinfrancois in #1093
- Keep
@Timeoutattributes and only convert whole minutes inImplausibleTimeoutToMinutesby @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
- @tashen247 made their first contribution in #1245
Full Changelog: v3.49.1...v3.50.0
v3.49.1
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
What's Changed
- Run the full Cucumber-JVM 7.x upgrade from
JUnit4to5Migrationby @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
What's Changed
- More efficient regexp for powermock unused Maven property by @greg-at-moderne in #1179
- Junit5MigrationTest to avoid flakiness by sorting sources by @greg-at-moderne in #1180
Full Changelog: v3.48.1...v3.48.2
v3.48.1
What's Changed
- Run the Cucumber JUnit Platform suite migration from
JUnit4to5Migrationby @timtebeek in #1178
Full Changelog: v3.48.0...v3.48.1
v3.48.0
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
RemoveDoNothingForDefaultMocksremoves imports only the deleted stub used by @jkschneider in #1154MockitoJUnitToMockitoExtensionmigrates onlyMockitoRulefields annotated with@Ruleby @jkschneider in #1155UseMockitoExtensionaddsmockito-junit-jupiterfor migratedMockitoRulefields by @jkschneider in #1156UseMockitoExtensionaddsmockito-junit-jupiterat the module's Mockito version by @jkschneider in #1157AddHamcrestIfUsedadds Hamcrest for any Hamcrest use, including matchers theExpectedExceptionmigration generates by @jkschneider in #1158AddJupiterDependenciesdeclares the Jupiter API directly in Maven modules that rundependency:analyzeby @jkschneider in #1159- The JUnit 4 migration adds
@Nestedonly 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
JUnit5to6MigrationrenamesExtensionContext.Store.getOrComputeIfAbsenttocomputeIfAbsentby @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
- @manduinca made their first contribution in #1117
- @mohitduhan19 made their first contribution in #1130
Full Changelog: v3.47.0...v3.48.0
3.47.0
What's Changed
- Drop the blank line before templated first statements by @steve-aom-elliott in #1121
- Advertise RSPEC-S5783 on AssertThrowsOnLastStatement by @steve-aom-elliott in #1120
- RemoveInitMocksIfRunnersSpecified: handle openMocks(this) as a try-with-resources resource by @kmccarp in #1118
Full Changelog: v3.46.0...v3.47.0
3.46.0
What's Changed
Full Changelog: v3.45.0...v3.46.0
3.45.0
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/anyIterableOfto their no-arg replacements by @timtebeek in #1100 - Retain
doNothing()for spies and partial mocks by @timtebeek in #1101 - Remove now-invalid
@Overridewhen migratingTestCasesubclasses by @timtebeek in #1104 - Migrate AssertJ
@Rulesoft assertions toSoftAssertionsExtensionby @timtebeek in #1105 - Retain the original stubbing method when rewriting static
whentoMockedStaticby @timtebeek in #1106 - test: add for final TestName Rule by @cortlepp in #1109
Full Changelog: v3.44.0...v3.45.0
3.44.0
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.StrictStubsinMockitoJUnitRunnerToExtensionby @timtebeek in #1079 - Retain assertTrue/assertFalse(a.equals(null)) as is by @timtebeek in #1075
- Emit
threadMode = SEPARATE_THREADwhen migrating@Test(timeout = N)by @timtebeek in #1076 - Add a blank line after the
mocksfield 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
staticon nested test classes with static members before Java 16 by @martinfrancois in #1082 - Do not wrap class level
mockStaticfields in try-with-resources by @timtebeek in #1089 - Fix
UpdateMockWebServerMockResponseTestexpectation by @timtebeek in #1090
New Contributors
- @martinfrancois made their first contribution in #1082
Full Changelog: v3.43.0...v3.44.0