Skip to content

Commit df3ca59

Browse files
author
Vincent Potucek
committed
[junit] add JupiterBestPractices
- https://docs.openrewrite.org/recipes/java/testing/junit/jupiterbestpractices Signed-off-by: Vincent Potucek <vpotucek@me.com> ... > Task :platform-tests:rewriteRun There were problems parsing platform-tests/platform-tests.gradle.kts All sources parsed, running active recipes: org.junit.openrewrite.SanityCheck Changes have been made to platform-tests/src/test/java/org/junit/platform/reporting/legacy/xml/LegacyXmlReportGeneratingListenerTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to platform-tests/src/test/java/org/junit/platform/reporting/open/xml/OpenTestReportGeneratingListenerTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to platform-tests/src/test/java/org/junit/platform/reporting/open/xml/JUnitContributorTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to platform-tests/src/test/java/org/junit/platform/launcher/core/DefaultLauncherTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.junit5.AssertThrowsOnLastStatement Changes have been made to platform-tests/src/test/java/org/junit/platform/launcher/core/LauncherFactoryTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to platform-tests/src/test/java/org/junit/platform/launcher/core/StreamInterceptorTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.SimplifyTestThrows Changes have been made to platform-tests/src/test/java/org/junit/platform/launcher/core/HierarchicalOutputDirectoryCreatorTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to platform-tests/src/test/java/org/junit/platform/launcher/core/ExecutionListenerAdapterTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to platform-tests/src/test/java/org/junit/platform/launcher/core/ListenerRegistryTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to platform-tests/src/test/java/org/junit/platform/launcher/core/InternalTestPlanTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to platform-tests/src/test/java/org/junit/platform/launcher/listeners/UniqueIdTrackingListenerIntegrationTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to platform-tests/src/test/java/org/junit/platform/launcher/listeners/SummaryGenerationTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to platform-tests/src/test/java/org/junit/platform/launcher/listeners/discovery/LoggingLauncherDiscoveryListenerTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to platform-tests/src/test/java/org/junit/platform/launcher/listeners/LoggingListenerTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to platform-tests/src/test/java/org/junit/platform/launcher/listeners/session/CompositeLauncherSessionListenerTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to platform-tests/src/test/java/org/junit/platform/commons/util/ReflectionUtilsWithGenericTypeHierarchiesTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to platform-tests/src/test/java/org/junit/platform/commons/util/pkg1/SuperclassWithStaticPackagePrivateBeforeMethod.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to platform-tests/src/test/java/org/junit/platform/commons/util/DefaultClasspathScannerTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.SimplifyTestThrows Changes have been made to platform-tests/src/test/java/org/junit/platform/commons/annotation/TestableAnnotationTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to platform-tests/src/test/java/org/junit/platform/commons/function/TryTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to platform-tests/src/test/java/org/junit/platform/commons/support/ResourceInteroperabilityTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to platform-tests/src/test/java/org/junit/platform/testkit/engine/NestedContainerEventConditionTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to platform-tests/src/test/java/org/junit/platform/engine/DiscoveryIssueTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/ParallelExecutionIntegrationTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix org.openrewrite.java.testing.cleanup.SimplifyTestThrows Changes have been made to platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/ForkJoinDeadLockTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to platform-tests/src/test/java/org/junit/platform/engine/support/hierarchical/SameThreadExecutionIntegrationTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.SimplifyTestThrows Changes have been made to platform-tests/src/test/java/org/junit/platform/engine/support/discovery/EngineDiscoveryRequestResolverTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to platform-tests/src/test/java/org/junit/platform/engine/support/descriptor/ClassSourceTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.SimplifyTestThrows Changes have been made to platform-tests/src/test/java/org/junit/platform/engine/support/store/NamespaceTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to platform-tests/src/test/java/org/junit/platform/engine/TestTagTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.junit5.CleanupAssertions org.openrewrite.java.testing.cleanup.AssertionsArgumentOrder Changes have been made to platform-tests/src/test/java/org/junit/platform/StackTracePruningTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.junit5.StaticImports org.openrewrite.java.UseStaticImport: {methodPattern=org.junit.jupiter.api.Assertions *(..)} Changes have been made to platform-tests/src/test/java/org/junit/platform/console/output/TestFeedPrintingListenerTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to platform-tests/src/test/java/org/junit/platform/console/ConsoleLauncherIntegrationTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.SimplifyTestThrows Changes have been made to platform-tests/src/jmh/java/org/junit/jupiter/jmh/AssertionBenchmarks.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.junit5.StaticImports org.openrewrite.java.UseStaticImport: {methodPattern=org.junit.jupiter.api.Assertions *(..)} org.openrewrite.java.testing.cleanup.AssertLiteralBooleanRemovedRecipe Please review and commit the results. Estimate time saved: 1h 58m > Task :jupiter-tests:rewriteRun Validating active recipes Scanning sources in project :jupiter-tests Using active styles [] There were problems parsing some source files, run with --info to see full stack traces There were problems parsing jupiter-tests/src/test/java/org/junit/jupiter/params/provider/MethodArgumentsProviderTests.java There were problems parsing jupiter-tests/src/test/kotlin/org/junit/jupiter/params/converter/TypedArgumentConverterKotlinTests.kt There were problems parsing jupiter-tests/src/test/kotlin/org/junit/jupiter/params/aggregator/DisplayNameTests.kt There were problems parsing jupiter-tests/src/test/kotlin/org/junit/jupiter/params/aggregator/ArgumentsAccessorKotlinTests.kt There were problems parsing jupiter-tests/src/test/kotlin/org/junit/jupiter/params/ParameterizedTestKotlinSequenceIntegrationTests.kt There were problems parsing jupiter-tests/src/test/kotlin/org/junit/jupiter/params/ParameterizedInvocationNameFormatterIntegrationTests.kt There were problems parsing jupiter-tests/src/test/kotlin/org/junit/jupiter/params/ParameterizedClassKotlinIntegrationTests.kt There were problems parsing jupiter-tests/src/test/kotlin/org/junit/jupiter/api/kotlin/KotlinAssertionsTests.kt There were problems parsing jupiter-tests/src/test/kotlin/org/junit/jupiter/api/kotlin/KotlinFailAssertionsTests.kt There were problems parsing jupiter-tests/src/test/kotlin/org/junit/jupiter/api/kotlin/KotlinDynamicTests.kt There were problems parsing jupiter-tests/src/test/kotlin/org/junit/jupiter/api/kotlin/KotlinAssertTimeoutAssertionsTests.kt There were problems parsing jupiter-tests/src/test/kotlin/org/junit/jupiter/api/kotlin/KotlinSuspendFunctionsTests.kt There were problems parsing jupiter-tests/src/test/kotlin/org/junit/jupiter/engine/kotlin/InstancePerMethodKotlinTestCase.kt There were problems parsing jupiter-tests/src/test/kotlin/org/junit/jupiter/engine/kotlin/KotlinInterfaceTestCase.kt There were problems parsing jupiter-tests/src/test/kotlin/org/junit/jupiter/engine/kotlin/KotlinInterfaceImplementationTestCase.kt There were problems parsing jupiter-tests/src/test/kotlin/org/junit/jupiter/engine/kotlin/KotlinDefaultImplsTestCase.kt There were problems parsing jupiter-tests/src/test/kotlin/org/junit/jupiter/engine/kotlin/ArbitraryNamingKotlinTestCase.kt There were problems parsing jupiter-tests/src/test/kotlin/org/junit/jupiter/engine/kotlin/InstancePerClassKotlinTestCase.kt There were problems parsing jupiter-tests/jupiter-tests.gradle.kts All sources parsed, running active recipes: org.junit.openrewrite.SanityCheck Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/migrationsupport/rules/AbstractTestRuleAdapterTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.junit5.CleanupAssertions org.openrewrite.java.testing.cleanup.AssertionsArgumentOrder org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/migrationsupport/rules/VerifierSupportForMixedMethodAndFieldRulesTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/migrationsupport/rules/WrongExtendWithForVerifierMethodTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/migrationsupport/rules/WrongExtendWithForVerifierFieldTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/params/ParameterizedTestIntegrationTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.junit5.CsvSourceToValueSource org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/params/support/AnnotationConsumerInitializerTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.junit5.CsvSourceToValueSource org.openrewrite.java.testing.cleanup.SimplifyTestThrows org.openrewrite.java.testing.junit5.AddParameterizedTestAnnotation Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/params/ParameterizedClassIntegrationTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/api/AssertNotSameAssertionsTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.junit5.CleanupAssertions org.openrewrite.java.testing.cleanup.AssertionsArgumentOrder Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/api/parallel/ResourceLockAnnotationTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/api/extension/ExecutableInvokerIntegrationTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/api/extension/CloseableResourceIntegrationTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/api/DynamicTestTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.junit5.StaticImports org.openrewrite.java.UseStaticImport: {methodPattern=org.junit.jupiter.api.Assertions *(..)} Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/api/AssertFalseAssertionsTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.AssertLiteralBooleanToFailRecipes org.openrewrite.java.testing.cleanup.AssertLiteralBooleanToFailRecipes$WithMessageRecipe org.openrewrite.java.testing.cleanup.AssertLiteralBooleanToFailRecipes$WithoutMessageRecipe org.openrewrite.java.testing.cleanup.AssertLiteralBooleanRemovedRecipe Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/api/subpackage/SubclassedAssertionsTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.AssertLiteralBooleanToFailRecipes org.openrewrite.java.testing.cleanup.AssertLiteralBooleanToFailRecipes$WithoutMessageRecipe org.openrewrite.java.testing.cleanup.AssertLiteralBooleanRemovedRecipe Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/api/condition/EnabledIfIntegrationTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/api/condition/DisabledIfIntegrationTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/api/condition/DisabledIfConditionTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/api/condition/EnabledIfConditionTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/api/condition/JRETests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/api/condition/EnabledIfConditionClassLoaderTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/api/condition/DisabledIfConditionClassLoaderTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/api/DisplayNameGenerationTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/api/AssertTrueAssertionsTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.AssertLiteralBooleanToFailRecipes org.openrewrite.java.testing.cleanup.AssertLiteralBooleanToFailRecipes$WithMessageRecipe org.openrewrite.java.testing.cleanup.AssertLiteralBooleanToFailRecipes$WithoutMessageRecipe org.openrewrite.java.testing.cleanup.AssertLiteralBooleanRemovedRecipe Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/FailedAssumptionsTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/ClassTemplateInvocationTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/extension/TestInstanceFactoryTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/extension/RepeatedTestTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/extension/LifecycleMethodExecutionExceptionHandlerTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/extension/BeforeAndAfterAllTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.junit5.CleanupAssertions org.openrewrite.java.testing.cleanup.AssertionsArgumentOrder Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/extension/CloseablePathTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.SimplifyTestThrows Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/extension/TestInstancePostProcessorTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/extension/TempDirectoryCleanupTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix org.openrewrite.java.testing.cleanup.SimplifyTestThrows Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/extension/TempDirectoryTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix org.openrewrite.java.testing.cleanup.SimplifyTestThrows Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/extension/TestInstancePreDestroyCallbackUtilityMethodTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/extension/TestInstancePostProcessorAndPreDestroyCallbackTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.junit5.CleanupAssertions org.openrewrite.java.testing.cleanup.AssertionsArgumentOrder org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/extension/BeforeAndAfterTestExecutionCallbackTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.junit5.CleanupAssertions org.openrewrite.java.testing.cleanup.AssertionsArgumentOrder org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/extension/ParameterResolverTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.AssertLiteralBooleanRemovedRecipe org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/extension/TimeoutExtensionTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix org.openrewrite.java.testing.cleanup.SimplifyTestThrows Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/extension/InvocationInterceptorTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/extension/ExecutionConditionTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/extension/TestInstancePreDestroyCallbackTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/extension/BeforeAndAfterEachTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.junit5.CleanupAssertions org.openrewrite.java.testing.cleanup.AssertionsArgumentOrder org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/extension/TestExecutionExceptionHandlerTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix org.openrewrite.java.testing.cleanup.SimplifyTestThrows Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/extension/ExtensionRegistrationViaParametersAndFieldsTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/extension/PreInterruptCallbackTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix org.openrewrite.java.testing.cleanup.SimplifyTestThrows Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/NestedWithInheritanceTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/bridge/ChildWithBridgeMethods.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/bridge/ChildWithoutBridgeMethods.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/bridge/AbstractNonGenericTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.junit5.StaticImports org.openrewrite.java.UseStaticImport: {methodPattern=org.junit.jupiter.api.Assertions *(..)} Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/bridge/PackagePrivateParent.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/NestedWithSeparateInheritanceTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/ExecutionCancellationTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/MultipleTestableAnnotationsTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix org.openrewrite.java.testing.junit5.RemoveDuplicateTestTemplates Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsTestMethodTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic org.openrewrite.java.testing.cleanup.TestMethodsShouldBeVoid Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/discovery/predicates/IsTestTemplateMethodTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix org.openrewrite.java.testing.cleanup.TestMethodsShouldBeVoid Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/discovery/DiscoveryTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix org.openrewrite.java.testing.cleanup.SimplifyTestThrows org.openrewrite.java.testing.cleanup.TestMethodsShouldBeVoid Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/discovery/DiscoverySelectorResolverTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix org.openrewrite.java.testing.cleanup.SimplifyTestThrows Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/ExceptionHandlingTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.junit5.StaticImports org.openrewrite.java.UseStaticImport: {methodPattern=org.junit.jupiter.api.Assertions *(..)} org.openrewrite.java.testing.cleanup.RemoveTestPrefix org.openrewrite.java.testing.cleanup.SimplifyTestThrows Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/TestClassInheritanceTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.junit5.CleanupAssertions org.openrewrite.java.testing.cleanup.AssertionsArgumentOrder Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/StandardTestClassTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.AssertLiteralBooleanRemovedRecipe org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/execution/ParameterResolutionUtilsTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.junit5.AssertThrowsOnLastStatement Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/SealedClassTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.AssertLiteralBooleanRemovedRecipe Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/descriptor/TestTemplateInvocationTestDescriptorTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/descriptor/ExtensionContextTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/descriptor/JupiterTestDescriptorTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/descriptor/TestTemplateTestDescriptorTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/descriptor/subpackage/ClassWithStaticInnerTestCases.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/descriptor/subpackage/Class2WithTestCases.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/descriptor/subpackage/Class1WithTestCases.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/descriptor/NamespaceTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/descriptor/LifecycleMethodUtilsTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.junit5.LifecycleNonPrivate Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/TestTemplateInvocationTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.RemoveTestPrefix Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/NestedTestClassesTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.junit5.StaticImports org.openrewrite.java.UseStaticImport: {methodPattern=org.junit.jupiter.api.Assertions *(..)} Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/LifecycleMethodOverridingTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/JupiterTestEngineTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.TestsShouldNotBePublic Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/RecordTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.cleanup.AssertLiteralBooleanRemovedRecipe Changes have been made to jupiter-tests/src/test/java/org/junit/jupiter/engine/TestInstanceLifecycleConfigurationTests.java by: org.openrewrite.java.testing.junit.JupiterBestPractices org.openrewrite.java.testing.junit5.CleanupAssertions org.openrewrite.java.testing.cleanup.AssertionsArgumentOrder Please review and commit the results. Estimate time saved: 4h 25m
1 parent 8429a08 commit df3ca59

File tree

72 files changed

+248
-229
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+248
-229
lines changed

.github/workflows/sanity-check.yml

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
name: Rewrite ♻️
2-
1+
name: ✅Rewrite
32
on:
43
push:
54
branches:
@@ -10,22 +9,19 @@ on:
109
pull_request:
1110
paths:
1211
- '.github/**'
13-
1412
permissions: {}
15-
1613
jobs:
1714
sanity-check:
18-
name: Sanity Check 🕊
15+
name: 🕊Sanity Check
1916
runs-on: ubuntu-latest
2017
permissions:
2118
security-events: write
2219
steps:
23-
- name: Checkout repository
20+
- name: 📥Checkout Repository
2421
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2522
with:
2623
persist-credentials: false
27-
28-
- name: rewriteDryRun
24+
- name: 🌀Rewrite Dry Run
2925
uses: ./.github/actions/run-gradle
3026
with:
3127
encryptionKey: ${{ secrets.GRADLE_ENCRYPTION_KEY }}

gradle/config/rewrite.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ tags:
99
- static-analysis
1010
- cleanup
1111
recipeList:
12-
- org.openrewrite.java.format.NormalizeLineBreaks
13-
- org.openrewrite.java.format.RemoveTrailingWhitespace
14-
- org.openrewrite.java.testing.junit5.CleanupAssertions
15-
# blank out breaking, consider individual fix.
16-
# - org.openrewrite.java.testing.junit5.JUnit5BestPractices
12+
- org.openrewrite.java.testing.junit.JupiterBestPractices
13+
# - org.openrewrite.staticanalysis.CodeCleanup
14+
# - org.openrewrite.staticanalysis.CommonStaticAnalysis
1715
---

gradle/plugins/common/src/main/kotlin/junitbuild.rewrite-conventions.gradle.kts

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,57 @@ plugins {
22
id("org.openrewrite.rewrite")
33
}
44

5+
dependencies {
6+
rewrite("org.openrewrite.recipe:rewrite-static-analysis:2.22.0")
7+
rewrite("org.openrewrite.recipe:rewrite-testing-frameworks:3.22.0")
8+
}
9+
510
rewrite {
611
activeRecipe("org.junit.openrewrite.SanityCheck")
712
configFile = project.getRootProject().file("gradle/config/rewrite.yml")
8-
// blank out breaking, consider individual fix.
9-
exclusion("**AssertEqualsAssertionsTests.java")
10-
exclusion("**AssertIterableEqualsAssertionsTests.java")
11-
exclusion("**AssertSameAssertionsTests.java")
13+
exclusion(
14+
"**AggregatorIntegrationTests.java",
15+
"**AnnotationConsumerInitializerTests.java",
16+
"**Assert**AssertionsTests.java", // trivial import fix.
17+
"**BeforeAndAfterSuiteTests.java",
18+
"**BridgeMethods.java",
19+
"**DiscoverySelectorResolverTests.java",
20+
"**DiscoveryTests.java",
21+
"**DisplayNameGenerationTests.java",
22+
"**DynamicNodeGenerationTests.java",
23+
"**DynamicTestTests.java",
24+
"**ExceptionHandlingTests.java",
25+
"**ExecutionCancellationTests.java",
26+
"**ExtensionRegistrationViaParametersAndFieldsTests.java",
27+
"**InvocationInterceptorTests.java",
28+
"**IsTestMethodTests.java",
29+
"**IsTestTemplateMethodTests.java",
30+
"**JupiterTestDescriptorTests.java",
31+
"**LifecycleMethodUtilsTests.java",
32+
"**MultipleTestableAnnotationsTests.java",
33+
"**NestedContainerEventConditionTests.java",
34+
"**ParallelExecutionIntegrationTests.java",
35+
"**ParameterResolverTests.java",
36+
"**ParameterizedTestIntegrationTests.java",
37+
"**RepeatedTestTests.java",
38+
"**StaticPackagePrivateBeforeMethod.java",
39+
"**SubclassedAssertionsTests.java",
40+
"**TempDirectoryCleanupTests.java",
41+
"**TestCase.java",
42+
"**TestCases.java",
43+
"**TestExecutionExceptionHandlerTests.java",
44+
"**TestInstanceFactoryTests.java",
45+
"**TestTemplateInvocationTestDescriptorTests.java",
46+
"**TestTemplateInvocationTests.java",
47+
"**TestTemplateTestDescriptorTests.java",
48+
"**TestWatcherTests.java",
49+
"**TimeoutExtensionTests.java",
50+
"**UniqueIdTrackingListenerIntegrationTests.java",
51+
"**WorkerThreadPoolHierarchicalTestExecutorServiceTests.java",
52+
"**documentation/src/test/java/example**",
53+
"**org/junit/jupiter/engine/bridge**",
54+
"**testFixtures/java/org/junit/vintage/engine/samples**",
55+
)
1256
setExportDatatables(true)
1357
setFailOnDryRunResults(true)
1458
}
15-
16-
dependencies {
17-
rewrite("org.openrewrite.recipe:rewrite-testing-frameworks:3.22.0")
18-
}

jupiter-tests/src/test/java/org/junit/jupiter/api/condition/DisabledIfConditionClassLoaderTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*
3030
* @since 5.10
3131
*/
32-
public class DisabledIfConditionClassLoaderTests {
32+
class DisabledIfConditionClassLoaderTests {
3333

3434
@Test
3535
// No need to introduce a "disabled" version of this test, since it would simply be the

jupiter-tests/src/test/java/org/junit/jupiter/api/condition/DisabledIfConditionTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*
2222
* @since 5.7
2323
*/
24-
public class DisabledIfConditionTests extends AbstractExecutionConditionTests {
24+
class DisabledIfConditionTests extends AbstractExecutionConditionTests {
2525

2626
@Override
2727
protected ExecutionCondition getExecutionCondition() {

jupiter-tests/src/test/java/org/junit/jupiter/api/condition/DisabledIfIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*
2222
* @since 5.7
2323
*/
24-
public class DisabledIfIntegrationTests {
24+
class DisabledIfIntegrationTests {
2525

2626
@Test
2727
@Disabled("Only used in a unit test via reflection")

jupiter-tests/src/test/java/org/junit/jupiter/api/condition/EnabledIfConditionClassLoaderTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*
3030
* @since 5.10
3131
*/
32-
public class EnabledIfConditionClassLoaderTests {
32+
class EnabledIfConditionClassLoaderTests {
3333

3434
@Test
3535
// No need to introduce a "disabled" version of this test, since it would simply be the

jupiter-tests/src/test/java/org/junit/jupiter/api/condition/EnabledIfConditionTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*
2222
* @since 5.7
2323
*/
24-
public class EnabledIfConditionTests extends AbstractExecutionConditionTests {
24+
class EnabledIfConditionTests extends AbstractExecutionConditionTests {
2525

2626
@Override
2727
protected ExecutionCondition getExecutionCondition() {

jupiter-tests/src/test/java/org/junit/jupiter/api/condition/EnabledIfIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
*
2222
* @since 5.7
2323
*/
24-
public class EnabledIfIntegrationTests {
24+
class EnabledIfIntegrationTests {
2525

2626
@Test
2727
@Disabled("Only used in a unit test via reflection")

jupiter-tests/src/test/java/org/junit/jupiter/api/condition/JRETests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
*
3030
* @since 5.7
3131
*/
32-
public class JRETests {
32+
class JRETests {
3333

3434
private static final JRE CURRENT_JRE = JRE.currentJre();
3535

0 commit comments

Comments
 (0)