Skip to content

Conversation

@tastybento
Copy link
Member

No description provided.

Removed the NMS libraries for now.
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.
Added step to grant execute permission for gradlew.
@tastybento tastybento requested a review from Copilot December 16, 2025 04:58
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 CommonTestSetup base 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.

@sonarqubecloud
Copy link

@tastybento tastybento merged commit 20e88a9 into master Dec 16, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants