Releases: openrewrite/rewrite-testing-frameworks
Releases · openrewrite/rewrite-testing-frameworks
3.31.0
What's Changed
- Fix AssertThrowsOnLastStatement crash on TypeCast arguments by @timtebeek in #933
- Functions annotated with TestFactory must return a value hence must be ignored by TestMethodsShouldBeVoid recipe by @barbulescu in #935
- Fix empty setUp/tearDown generation and missing public modifier for JUnit 4 by @bmuschko in #936
- Fix AssertThrowsOnLastStatement cursor chain for JavaTemplate compatibility by @timtebeek in #938
- Convert ArgumentMatcher anonymous class to lambda in Mockito migration by @bmuschko in #937
- Add apiguardian-api to annotation processor classpath by @timtebeek in #939
- Add mockito-junit-jupiter dependency when MockitoExtension is introduced by @bmuschko in #941
- Add PowerMockRunnerDelegateToRunWith recipe by @bmuschko in #940
New Contributors
- @barbulescu made their first contribution in #935
Full Changelog: v3.30.0...v3.31.0
3.30.0
What's Changed
- Use
FindImportsand dependency-aware framework detection inReplaceMockitoTestExecutionListenerby @steve-aom-elliott in #925 - Align targetFramework switch value with @option valid values by @steve-aom-elliott in #928
- Add JSpecify to type table for
JUnitToAssertJRulesRecipesby @timtebeek in #929 - Fix CI failure from upstream AddDependency changes by @timtebeek in #931
Full Changelog: v3.29.0...v3.30.0
3.29.0
What's Changed
- Detect JUnit version in PowerMockitoMockStaticToMockito by @MBoegers in #919
- ReplacePowerMockito: ensure mockito-core is added when PowerMock is removed by @MBoegers in #920
- Remove all remaining PowerMock dependencies in ReplacePowerMockito recipe by @steve-aom-elliott in #921
- Add JUnit 4 support to AddMockitoExtensionIfAnnotationsUsed by @bmuschko in #922
- Use mockito-inline instead of mockito-core where applicable by @bmuschko in #923
- Add recipe to replace MockitoTestExecutionListener by @steve-aom-elliott in #924
- Remove empty constructors and suite() methods in MigrateJUnitTestCase by @timtebeek in #926
New Contributors
Full Changelog: v3.28.0...v3.29.0
3.28.0
What's Changed
- Fix 6 issues in AssertJ recipe migrations by @timtebeek in #911
- Preserve throws clause when checked exceptions exist outside assertThrows. by @motlin in #899
- Pin AssertJ to stable 3.27.7 by @timtebeek in #913
- Add .contextSensitive() to Hamcrest conversion templates and improve type matching in
CollapseConsecutiveAssertThatStatementsby @timtebeek in #912 - Fix 2 AssertJ migration recipe issues found via large-scale validation by @timtebeek in #914
- Add Hamcrest to AssertJ recipes for hasProperty, everyItem, and hasItem(Matcher) by @timtebeek in #916
- Add missing Hamcrest not(Matcher) to AssertJ conversions by @timtebeek in #917
- Do not incorrectly strip method calls from assertion arguments by @timtebeek in #918
Full Changelog: v3.27.0...v3.28.0
3.27.0
What's Changed
- Correcting MockWebServer migration for OkHttp by @steve-aom-elliott in #849
- Add
ReturnActualrecipe for AssertJ by @timtebeek in #891 - Add
MockConstructionToTryWithResourcesrecipe by @jkschneider in #892 - Add CleanupKotlinJUnit5AssertionImports recipe by @jkschneider in #893
- Skip Kotlin files in PowerMockitoMockStaticToMockito by @jkschneider in #894
- Add test cases for
MockedConstructionpattern by @jkschneider in #895 - Update byte buddy to a Java 25 compatible version by @Laurens-W in #897
- Followup after the formatting merge by @Jenson3210 in #900
- Skip TemporaryFolder conversion when used in RuleChain. by @motlin in #898
- Add JUnit 4 to JUnit 5 exception class migrations. by @motlin in #902
- Make declarative recipes singletons by @sambsnyd in #905
- Handle method references in JUnit Assert to Assertions migration. by @motlin in #901
- Add explicit test scope to AssertJ dependency additions by @Jenson3210 in #903
- Skip SimplifyChainedAssertJAssertion when actual type has wildcard type parameters by @knutwannheden in #906
- Revert "Add explicit test scope to AssertJ dependency additions (#903)" by @Jenson3210 in #907
- Fix AssertThrowsOnLastStatement to preserve parameterized types when extracting arguments. by @motlin in #908
- Enhance RemoveInitMocksIfRunnersSpecified to also remove openMocks by @dsgrieve in #904
RemoveInitMocksIfRunnersSpecified(or any recipe) should not have a mutable static field by @Jenson3210 in #910
New Contributors
Full Changelog: v3.26.0...v3.27.0
3.26.0
What's Changed
- Transform
Assumemethods to without a direct counterpart to equivalentAssumptionsby @cortlepp in #889 - Apply Kotlin style class reference in
AddMockitoExtensionIfAnnotationsUsedby @Laurens-W in #890
New Contributors
Full Changelog: v3.25.0...v3.26.0
3.25.0
What's Changed
- add upgrade recipe for deprecated APIs introduced in junit 5.13 by @murdos in #877
- throwing ParseError.toException by @greg-at-moderne in #878
- Add recipe to migrate JUnit 4 ExternalResource rules using jupiter-migrationsupport by @amishra-u in #880
- Drop
FindUnitTestsand associated data table by @timtebeek in #882 - fix: HamcrestMatcherToAssertJ argumentType does not allow subclasses by @Gosho1024 in #881
- Convert TestContainers raw types as part of upgrade by @timtebeek in #883
- Add or update recipe category descriptors by @jkschneider in #884
New Contributors
- @Gosho1024 made their first contribution in #881
Full Changelog: v3.24.0...v3.25.0
3.24.0
What's Changed
- Recipe to check that Kotlin test methods return Unit by @greg-dennis in #871
- Reorder
maybeRemoveImportbeforemaybeAddImportby @timtebeek in #873 - Add test for Kotlin by @Laurens-W in #876
New Contributors
- @greg-dennis made their first contribution in #871
Full Changelog: v3.23.0...v3.24.0
3.23.0
What's Changed
- Add
@ExtendWith(MockitoExtension.class)Test using Mockito Annotations by @MBoegers in #848 - Add troubleshooting context info when ParseError encountered in
GradleUseJunitJupiterby @greg-at-moderne in #852 - Fix/850 testcontainers2 migration only springboot4 by @Thomas-Iapichino in #854
- Fixed the expectation to be correctly spaced + formatted args by @Jenson3210 in #855
- Simplify redundant AssertJ chains of
hasSizeandcontainsExactlyby @timtebeek in #857 - Simplify AssertJ
stream().map(Function)toextracting(Function)by @timtebeek in #856 AssertThrowsOnLastStatement: Support calls with lambda parameters by @knutwannheden in #859- Fix bugs in
HamcrestMatcherToAssertJandHamcrestIsMatcherToAssertJby @knutwannheden in #863 HamcrestMatcherToAssertJ:isNull()andisNotNull()take no args by @knutwannheden in #864- Fix variable name conflict in JMockit to Mockito migration by @knutwannheden in #865
New Contributors
- @Thomas-Iapichino made their first contribution in #854
Full Changelog: v3.22.0...v3.23.0