Files
Bifrost/.claude/skills/java-testing/SKILL.md
T

1.5 KiB

name, description
name description
java-testing Use when adding or changing unit or integration tests for Java services, validation, project keys, or HTTP interactions.

Java testing

  • Use pinned JUnit Jupiter and AssertJ; use Mockito only for narrow collaborator seams.
  • Mock HTTP at the transport boundary with a local in-process HttpServer; tests must not need a real Gitea instance or network.
  • Test pagination, authentication failures, 404, 5xx, malformed payloads, timeout behavior, and secret redaction.
  • Test project-key sanitization, invalid/empty inputs, and collisions across distinct source names.
  • Test organization allowlist behavior in both fixed and all-accessible modes.
  • Use deterministic fixtures, no sleeps, no dependence on wall-clock except injected clock behavior.
  • Run ./mvnw test (Windows: mvnw.cmd test) and report only results actually run.

Checklist

  • Gitea HTTP paths and failure mapping covered.
  • Key and organization boundary cases covered.
  • Tests are offline and deterministic.
  • Test suite passes with Maven Wrapper.

Sources

Not verified

  • Plugin lifecycle integration tests against a running server are outside unit test scope.