forked from jooby-project/jooby
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIssue2408.java
More file actions
29 lines (23 loc) · 733 Bytes
/
Copy pathIssue2408.java
File metadata and controls
29 lines (23 loc) · 733 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package io.jooby.i2408;
import static org.junit.jupiter.api.Assertions.assertEquals;
import io.jooby.WebClient;
import io.jooby.junit.ServerTest;
import io.jooby.junit.ServerTestRunner;
public class Issue2408 {
@ServerTest
public void shouldNotIgnoreAnnotationOnParam(ServerTestRunner runner) {
runner.define(app -> {
app.mvc(new C2408());
app.error((ctx, cause, code) -> {
ctx.send(cause.getMessage());
});
}).ready((WebClient http) -> {
http.get("/2408/nullable?blah=stuff", rsp -> {
assertEquals("nothing", rsp.body().string());
});
http.get("/2408/nonnull", rsp -> {
assertEquals("Missing value: 'name'", rsp.body().string());
});
});
}
}