You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding dependency guards to the Junit 4 -> 5 migration for when the POM or build.gradle have a dependency on org.testng:testng. (#760)
* Adding dependency guards to the Junit 4 -> 5 migration for when the POM or build.gradle have a dependency on `org.testng:testng`. Relies on openrewrite/rewrite#5725
* Updating `DoesNotIncludeDependency` recipe call to be the shared one in `rewrite-java-dependencies`
* Avoid tests passing for the wrong reason (class present)
* Only pass testng dependency into the single test that needs it
* Match any testng dependency
* Adding TestNgGuard scanning recipe. Needs refinement, but this is a first pass
* Apply suggestions from code review
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Making separate `TestNgGuard` tests and cleaning up other code
* Cleanup of import
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
* Made the `TestNgGuard` more flexible for situations where there isn't an enclosing project for a source file, which was a majority of our existing tests.
- If it figures out it's a loose file not in a `JavaProject`, it can't ensure project scope anyway, so falls back to solely whether the file itself has a TestNG dependency or uses TestNG types instead for those
* Do not use getters internally
* Adopt `ModuleHasDependency` and drop odd test: only look at dependencies
Assuming classes can not be present without those dependencies
* Revert change to `TestNgToAssertJTest`
* Drop tests that were showing improbable use of types
* Switching to using the new `invertMarking` option on `ModuleHasDependency` for the TestNG guard for JUnit
---------
Co-authored-by: Tim te Beek <tim@moderne.io>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
0 commit comments