You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A fully working implementation of req/res could be an option to all Javalin users that cannot simply start/stop whole instances and that use mocks these days.
The implementation should be relatively simple, most of our API goes through Context interface that implements most of the API with default functions.
We could provide something like:
// given: a requestval context =TestContextSpec()
.body("abc")
.header(HttpHeaders.AUTHORIZATION, "Basic xyz")
// when: endpoint is called
endpoint.handle(context.build())
// then: it's ok
assertThat(context.status()).isEqualTo(HttpStatus.OK)
The text was updated successfully, but these errors were encountered:
A fully working implementation of req/res could be an option to all Javalin users that cannot simply start/stop whole instances and that use mocks these days.
The implementation should be relatively simple, most of our API goes through
Context
interface that implements most of the API with default functions.We could provide something like:
The text was updated successfully, but these errors were encountered: