Migrate to JUnit5 - Part 3#4155
Conversation
Also move LanguageVersionTests into their language packages and add missing tests
Generated by 🚫 Danger |
Only use RuleTestDescriptor instead of TestDescriptor. TestDescriptor can be removed then. Remove previously internalized methods or make them private.
This moves some utility methods around, that are used by more than one test class.
Needs build-tools 20-SNAPSHOT Uses new ruleset "pmd-test-dogfood-config.xml"
line endings...
This class was added in PMD 7 only and doesn't exist in PMD 6.
|
This is finally done now. I've directly removed the old JUnit4 test runners and added a note in the release notes. They are not deprecated in PMD6 but maybe they should? At least, these classes are not supposed to be used directly, so could be considered internal api, that is removed with PMD 7. Wdyt? |
There was a problem hiding this comment.
Thanks for the huge effort Andreas! I'm certainly happy to see this completed.
I've directly removed the old JUnit4 test runners and added a note in the release notes.
I think what you wrote is fine, and we do not need to go out of our way to deprecate these in PMD 6. Potential users are few (none on github anyway)
|
|
||
| import net.sourceforge.pmd.AbstractRuleSetFactoryTest; | ||
|
|
||
| class RuleSetFactoryTest extends AbstractRuleSetFactoryTest { |
There was a problem hiding this comment.
I wonder if these test classes should be renamed. I think a name like "SwiftStandardRulesetsTests" would be more appropriate, RuleSetFactory is in pmd-core and is deprecated.
There was a problem hiding this comment.
Yes, probably. I think, we have this for most languages and it's also part of the howto (https://docs.pmd-code.org/pmd-doc-7.0.0-SNAPSHOT/pmd_devdocs_major_adding_new_language_javacc.html#15-test-the-rules). It really would help to use a naming pattern like your suggestion.
Describe the PR
Continuation of #4028
egrep -r "(org.junit.Test)|(org.junit.Assert)|(junit.framework)|(import org.junit.jupiter.api.Assertions)|(import org.hamcrest.MatcherAssert)|(import org.junit.jupiter.api.Assumptions)" *find -name "pom.xml"|grep -v target|xargs egrep "<groupId>junit|JUnitParams|system-rules|kotlin-test-junit|ant-testutil"Related issues
Ready?
./mvnw clean verifypasses (checked automatically by github actions)