Repository navigation
Align test names with recipes, group no-change tests and tidy classpath entries and YAML - #1235
Merged
Merged
Conversation
…th entries and YAML
23 of 76 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A handful of tests were named after something other than what they test, some parsers used unversioned or unneeded classpath entries, and a few YAML files had cosmetic leftovers. None of this changes recipe behaviour; it makes the tests easier to find and the sources more consistent.
Test naming
MockitoRuleDependencyTestis renamed toAddMockitoJupiterForRulesTest(viagit mv), after the recipe it covers.MockitoBestPracticesTestloadedMockito1to5Migration, which already has its ownMockito1to5MigrationTest. It now loadsMockitoBestPractices, which includesMockito1to5Migration, so the existing expectations still hold and the test now covers the recipe it is named after.AssertEqualsBooleanToAssertBooleanTestdropped a per-testspec.recipe(..)that repeateddefaults().No-change tests grouped in
@Nested class NoChange, followingHandleExternalResourceRulesTest. Tests were moved as-is, with names kept. This applies to classes with three or more no-change tests:AddTestcontainersAnnotationsTest,MigrateStubMappingUuidToIdTest,RemoveDuplicateContentTypeHeaderTest,RemoveDuplicateContentTypeStubHeaderTest,ReplaceRemovedConstructorsTest,ReplaceSettersWithTransformTestandWiremock3to4MigrationTest.Classpath entries
classpathFromResources(ctx, "testng-7")instead of the runtimeclasspath("testng").AddJupiterDependenciesTestnow usesjunit-jupiter-api-5.hamcrest-3from the template parsers inTimeoutRuleToClassAnnotationandJUnitParamsRunnerToParameterized, andjunit-4from the one inAssertTrueInstanceofToAssertInstanceOf. None of those templates reference Hamcrest or JUnit 4 types.YAML hygiene
matchOverrides: falsefrom theChangeMethodNameinjunit6.yml;falseis already the default for that option.---fromdbrider.yml.assertj.yml.Skipped
ExecutionListenerToDbRiderAnnotationUnitTest(both already at the end),ReplaceContainerImageNameTest,MigrateContentTypeHeaderCharsetTest,MigrateRequestMethodIsOneOfTestandWireMockRuleToWireMockServerTest. The Arquillian tests currently have no no-change tests at all.recipes.csvis not affected, as no names, descriptions or options changed.Verified with
./gradlew teston the touched test classes and packages (theassertj,testng,testcontainers,wiremock,dbriderandjunit6packages, plusAddMockitoJupiterForRulesTest,MockitoBestPracticesTest,AssertEqualsBooleanToAssertBooleanTest,AddJupiterDependenciesTest,TimeoutRuleToClassAnnotationTest,JUnitParamsRunnerToParameterizedTest,AssertTrueInstanceofToAssertInstanceOfTestandJUnit5MigrationTest): 846 tests, 0 failures.Fixes item N10 of #1211.