• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

valkyrjaio / valkyrja-starter-app-java / 30422605780

29 Jul 2026 04:33AM UTC coverage: 96.037% (-0.08%) from 96.119%
30422605780

push

github

web-flow
[Http] Add a route for every routing permutation with regression and generated data tests (#55)

# Description

Adds one route per routing permutation to the example application, each
covered by
regression and generated-data tests — the Java counterpart to the HTTP
permutations in the
PHP starter app (valkyrjaio/valkyrja-starter-app-php#172).

Every permutation lives on a dedicated `RoutingPermutationsController`,
namespaced under
`/permutations`, and each route echoes back the value(s) bound to its
parameters so the
binding is directly assertable.

**The permutations** — twelve parameter types (`NUM`, `ID`, `SLUG`,
`ALPHA`,
`ALPHA_LOWERCASE`, `ALPHA_UPPERCASE`, `ALPHA_NUM`,
`ALPHA_NUM_UNDERSCORE`, `ANY`, `UUID`,
`ULID`, `VLID`) plus an optional parameter, multiple parameters, a
non-capturing parameter,
a static route, a method-restricted route, and a route declared for
every method.

Until now the application declared no dynamic route at all, which is why
its generated-data
test asserted `dynamicPaths()` and `regexes()` were empty — that whole
code path had never
been exercised.

**Coverage:**

1. **Regression (unit)** — the controller returns the expected body for
each permutation, and
each provider handler binds its route's parameter(s) and delegates,
including the
   unbound-parameter case.
2. **Generated data (`sindri-junit`)** — asserts the *sindri-generated*
routing table carries
every permutation with the **exact** regex the framework's processor
produces, that a
non-capturing parameter yields an unnamed group, and that dynamic paths
and regexes are now
   populated.

## Found while writing these tests

Two defects, each fixed separately and needed for this to be correct end
to end:

- **Framework** — a route declared with a `{parameter}` path but the
plain `@Route`
annotation was never rebuilt as a dynamic route, so it got no regex and
could never match
when collected at runtime. Fixed in valkyrjaio/valkyrja-java#67
(merged).
- **Sindri** — `... (continued)

12 of 12 branches covered (100.0%)

Branch coverage included in aggregate %.

400 of 417 relevant lines covered (95.92%)

9.76 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

60.0
/src/main/java/app/http/provider/ServiceProvider.java


Source Not Available

The file "src/main/java/app/http/provider/ServiceProvider.java" isn't available on github. Either it's been removed, or the repo root directory needs to be updated.

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc