Nano Banana Pro
Agent skill for nano-banana-pro
This document outlines the testing strategy for the CrysisShot plugin. The goal is to ensure code quality, prevent regressions, and facilitate ongoing development. We will employ a combination of:
Sign in to like and favorite skills
This document outlines the testing strategy for the CrysisShot plugin. The goal is to ensure code quality, prevent regressions, and facilitate ongoing development. We will employ a combination of:
pom.xml (usually junit-jupiter-api and junit-jupiter-engine in test scope).mockito-core) to pom.xml for mocking dependencies (especially Bukkit API classes).src/test/java/com/crysisshot/... exists.For these classes, we can write pure JUnit tests with minimal to no mocking of Bukkit APIs.
ConfigManager.java
config.yml.MessageManager.java
en.yml locale.Arena.java (Non-Bukkit specific logic)
name, minPlayers, maxPlayers, theme.setState, getState).isValid() if it doesn't rely heavily on Bukkit locations immediately).ScoreCalculator.java (if logic is sufficiently decoupled)
Arena.Theme (Enum)
getDisplayName() and getDescription() methods.For classes interacting more directly with Bukkit APIs, we'll use Mockito to mock those dependencies.
ArenaManager.java
CrysisShot plugin instance, ConfigManager, FileConfiguration (for arenas.yml).loadArenas():
arenas.yml.saveArenas():
arenas.yml.addArena(), removeArena(), getArena().validateArena():
Location, World as needed.ArenaSetupManager.java
Player, CrysisShot plugin, ArenaManager, MessageManager.startSetup():
endSetup():
handleSetupCommand() for various sub-commands:
setLobby, setSpectator, addSpawn, removeSpawn, setBounds, setTheme, setPlayers.ArenaSetupSession and ArenaManager.validateCurrentSetup() logic.ArenaThemeManager.java
CrysisShot plugin, Arena.initializeThemeConfigurations(): Verify that theme configurations are loaded correctly.getThemeConfiguration() for different themes.getBuildingGuidelines() for various themes.startThemeEffects and stopThemeEffects is challenging due to BukkitScheduler. We can test that the correct parameters would be passed to the scheduler, or that tasks are correctly added/removed from activeEffects, but not the effects themselves.CrysisShotCommand.java (Focus on command logic, not execution outcome)
CommandSender, Player, CrysisShot plugin, and all relevant managers (GameManager, MessageManager, ArenaSetupManager, ArenaThemeManager)./cs admin setup start <name>, /cs admin theme preview <theme>):
MessageManager.onTabComplete() logic for various argument lengths and commands.This phase will focus on testing interactions between multiple components. MockBukkit might be introduced here for more realistic server environment simulation if pure mocking becomes too cumbersome.
/cs admin setup ... commands.Arena object is correctly configured in ArenaManager.arenas.yml is updated correctly upon saving./cs admin setup theme <theme_name> during setup./cs admin theme preview <theme_name>.Arena object reflects the chosen theme and that ArenaThemeManager provides correct data.config.yml or arenas.yml./cs admin reload.ConfigManager and ArenaManager reflect the reloaded configurations.This will continue as per our current workflow, where the AI agent (GitHub Copilot) generates test scenarios and command sequences, and the developer executes them on a live or test server.
Key Scenarios to Cover (Iteratively):
ConfigManager.getString()").mvn test.test: add unit tests for ConfigManager or test: cover theme preview command logic.This document will be updated as the testing progresses and new areas for testing are identified.