giuseppe-trisciuoglio avatar

Unit Test Boundary Conditions

Covers the boundary conditions that break production code but somehow never make it into your test suite until they do. Handles integer min/max values, overflow detection with Math.addExact, null and empty strings, collection edge cases (empty, single, many), floating-point precision with tolerance-based assertions, and array index boundaries. Uses JUnit 5 parameterized tests to run multiple boundary values efficiently. The examples are thorough, showing both the happy path at boundaries and the exceptions you should expect. The iterative approach is smart: when a boundary test fails, use that to discover what other edges you missed. If you're tired of production bugs from zero-length arrays or MAX_VALUE plus one, this gives you the patterns to catch them in tests first.

skills.sh installs
4.2K
GitHub stars
369
last updated
Aug 21, 2026

Install

$ npx -y skills add giuseppe-trisciuoglio/developer-kit --skill unit-test-boundary-conditions --agent claude-code

Installs into .claude/skills of the current project.

Files

Unit Testing Boundary Conditions and Edge Cases

Overview

Systematic patterns for testing boundary conditions, corner cases, and limit values in Java using JUnit 5. Covers numeric boundaries, string edge cases, collection states, floating-point precision, date/time limits, and off-by-one scenarios.

When to Use

  • Numeric min/max limits, null/empty/whitespace inputs
  • Overflow/underflow validation, collection boundaries
  • Off-by-one errors, floating-point precision

Instructions

Sponsors

Details

Repository
github.com/giuseppe-trisciuoglio/developer-kit
Categories
Backend & APIs, Testing & QA, Documentation, Java & JVM

More from giuseppe-trisciuoglio/developer-kit

All 102
1dotnet avatarbuild-perf-baselinedotnet/skillsEstablish build performance baselines and apply systematic optimization techniques. USE FOR: diagnosing slow builds, establishing before/after measurements (col4.2Kskills.sh installs
2softaworks avatarreact-devsoftaworks/agent-toolkitThis skill should be used when building React components with TypeScript, typing hooks, handling events, or when React TypeScript, React 19, Server Components a4.2Kskills.sh installs
3lobehub avataradd-setting-envlobehub/lobehubAdd server-side environment variables that control default values for user settings.4.2Kskills.sh installs
4dotnet avatarmigrate-dotnet9-to-dotnet10dotnet/skillsMigrate a .NET 9 project or solution to .NET 10 and resolve all breaking changes. USE FOR: upgrading TargetFramework from net9.0 to net10.0, fixing build errors4.2Kskills.sh installs
5dpearson2699 avatarswift-languagedpearson2699/swift-ios-skillsApply modern Swift language patterns and idioms for non-concurrency, non-SwiftUI code. Covers if/switch expressions (Swift 5.9+), typed throws (Swift 6+), resul4.1Kskills.sh installs
6ailabs-393 avatartravel-plannerailabs-393/ai-labs-claude-skillsThis skill should be used whenever users need help planning trips, creating travel itineraries, managing travel budgets, or seeking destination advice. On first4.1Kskills.sh installs