src/Infrastructure/Plugins/JsonPlugin.cs is a self-contained plugin (no constructor dependencies — nothing to mock) that exposes JSON utilities to agents: Format, Minify, Get, Keys, Search, Merge, ToText, Validate. It's documented in docs/plugins.md but has no dedicated test file under tests/FuseraftCli.Tests/. The only existing reference to it in the test suite is PluginCapabilityMapCoverageTests.cs, which just checks that the plugin is registered — it doesn't exercise any of the actual behavior.
Task
Add tests/FuseraftCli.Tests/JsonPluginTests.cs covering the public methods above. Suggested cases:
Get with a plain dot path, a bracket-array path (e.g. items[2]), and a path that doesn't exist
Merge where the patch overrides some base keys and adds new ones
Search finding a nested key match and the "not found" case
Format / Minify / Validate on both valid and invalid JSON strings
Keys on an object, an array, and a scalar
ToText on a small nested object
Acceptance criteria
- Each public method has at least one happy-path test and one edge-case test (invalid input, empty object/array, or missing path).
./build.sh --target=Test passes.
- Follow the conventions in
CONTRIBUTING.md (one file per class, no ILogger mocks needed here since the class takes none).
Good first issue — no orchestration or plugin-registration knowledge required, just the JSON utility methods themselves.
src/Infrastructure/Plugins/JsonPlugin.csis a self-contained plugin (no constructor dependencies — nothing to mock) that exposes JSON utilities to agents:Format,Minify,Get,Keys,Search,Merge,ToText,Validate. It's documented indocs/plugins.mdbut has no dedicated test file undertests/FuseraftCli.Tests/. The only existing reference to it in the test suite isPluginCapabilityMapCoverageTests.cs, which just checks that the plugin is registered — it doesn't exercise any of the actual behavior.Task
Add
tests/FuseraftCli.Tests/JsonPluginTests.cscovering the public methods above. Suggested cases:Getwith a plain dot path, a bracket-array path (e.g.items[2]), and a path that doesn't existMergewhere the patch overrides some base keys and adds new onesSearchfinding a nested key match and the "not found" caseFormat/Minify/Validateon both valid and invalid JSON stringsKeyson an object, an array, and a scalarToTexton a small nested objectAcceptance criteria
./build.sh --target=Testpasses.CONTRIBUTING.md(one file per class, noILoggermocks needed here since the class takes none).Good first issue — no orchestration or plugin-registration knowledge required, just the JSON utility methods themselves.