Merged
Conversation
static infection.
Avoids statics.
Mokito 5 redo
Removed the NMS libraries for now.
This reverts commit 681c9e7.
MockBukkit is not compatible with the paperweight provided artifact. Whenever these two artifacts are simultaneously provided at test time, it causes errors. Solution: exclude the paperweight provided artifact at test time.
Updated GitHub Actions workflow to use SonarQube for analysis, changed JDK distribution, and added Gradle caching.
…BentoBox.git into gradle_conversion
Added step to grant execute permission for gradlew.
…BentoBox.git into gradle_conversion
Mojang mapped
There was a problem hiding this comment.
Pull request overview
This PR migrates the test suite from JUnit 4 to JUnit 5 (Jupiter) and from PowerMock to Mockito's native static mocking capabilities. The migration includes updating test annotations, removing PowerMock dependencies, and consolidating common test setup into a new CommonTestSetup base class.
Key Changes
- Migration from JUnit 4 (
@Test,@Before,@After) to JUnit 5 (@Test,@BeforeEach,@AfterEach) annotations - Replacement of PowerMock static mocking with Mockito's
MockedStatic - Introduction of
CommonTestSetupbase class to consolidate repeated test setup code - Removal of several obsolete test files that are no longer needed
Reviewed changes
Copilot reviewed 160 out of 248 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| BannedCommandsTest.java | Updated to extend CommonTestSetup and use JUnit 5 annotations; simplified mock setup by leveraging base class |
| PlaceholderAPIHookTest.java | Removed entire test file |
| ZNPCsPlusHookTest.java | Removed entire test file |
| MythicMobsHookTest.java | Removed entire test file |
| ItemsAdderHookTest.java | Removed entire test file |
| YamlDatabaseHandlerTest.java | Removed entire test file |
| MySQLDatabaseHandlerTest.java | Removed entire test file |
| MySQLDatabaseConnectorTest.java | Removed entire test file |
| LogEntryListAdapterTest.java | Removed entire test file |
| PlayersTest.java | Removed entire test file |
| NamesTest.java | Removed entire test file |
| IslandTest.java | Removed entire test file |
| IslandDeletionTest.java | Removed entire test file |
| ItemStackTypeAdapterTest.java | Removed entire test file |
| FlagAdapterTest.java | Removed entire test file |
| JSONDatabaseHandlerTest.java | Removed entire test file |
| DatabaseTest.java | Removed entire test file |
| DatabaseConnectionSettingsImplTest.java | Removed entire test file |
| BentoBoxReloadCommandTest.java | Removed entire test file |
| BentoBoxPermsCommandTest.java | Removed entire test file |
| BlueprintEntityTest.java | Updated to extend CommonTestSetup, use JUnit 5 annotations, and replace Assert.assertTrue/assertFalse with direct assertions |
| BlueprintPasterTest.java | Updated to extend CommonTestSetup, use MockedStatic for static mocking, and disabled with @disabled annotation |
| BlueprintClipboardTest.java | Updated to extend CommonTestSetup and use JUnit 5 annotations |
| UserTest.java | Updated to extend CommonTestSetup, use JUnit 5 annotations, and replaced PowerMock with MockedStatic |
| NotifierTest.java | Updated to use JUnit 5 annotations |
| PanelItemBuilderTest.java | Updated to extend CommonTestSetup and use JUnit 5 annotations |
| PanelBuilderTest.java | Updated to extend CommonTestSetup and use JUnit 5 annotations |
| PanelTest.java | Updated to extend CommonTestSetup, use MockedStatic for HeadGetter, and verify static method calls correctly |
| PanelItemTest.java | Updated to extend CommonTestSetup and use JUnit 5 annotations |
| MetaDataValueTest.java | Removed PowerMockRunner and updated to use JUnit 5 annotations |
| TextVariablesTest.java | Updated to use JUnit 5 annotations |
| BentoBoxLocaleTest.java | Updated to extend CommonTestSetup, use MockedStatic for ItemParser |
| WorldToggleClickTest.java | Updated to extend CommonTestSetup and replaced PowerMock with mockedUtil |
| IslandToggleClickTest.java | Updated to extend CommonTestSetup and replaced PowerMock with mockedUtil |
| CycleClickTest.java | Updated to extend RanksManagerTestSetup and use mockedRanksManager for static mocking |
| FlagTest.java | Updated to extend RanksManagerTestSetup and use mockedUtil/mockedRanksManager |
| IslandEventTest.java | Updated to extend CommonTestSetup and use Mockito.mockStatic |
| AddonEventTest.java | Updated to extend CommonTestSetup and verify plugin manager interactions |
| AddonEnableEventTest.java | Updated to extend CommonTestSetup and use @disabled annotation |
| IslandTeamUntrustCommandTest.java | Updated to extend RanksManagerTestSetup and use MockedStatic for User class |
| IslandTeamUncoopCommandTest.java | Updated to extend RanksManagerTestSetup and use MockedStatic for User class |
| IslandTeamTrustCommandTest.java | Updated to extend RanksManagerTestSetup and use MockedStatic for User class |
| IslandTeamSetownerCommandTest.java | Updated to extend RanksManagerTestSetup and removed PowerMock usage |
| IslandTeamPromoteCommandTest.java | Updated to extend RanksManagerTestSetup and use mockedBukkit |
| IslandTeamLeaveCommandTest.java | Updated to extend RanksManagerTestSetup and simplified setup |
| IslandTeamKickCommandTest.java | Updated to extend RanksManagerTestSetup and removed redundant setup code |
| IslandTeamCommandTest.java | Updated to extend RanksManagerTestSetup and fixed verify call |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
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.



No description provided.