forked from jooby-project/jooby
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIssue2240.java
More file actions
31 lines (22 loc) · 708 Bytes
/
Copy pathIssue2240.java
File metadata and controls
31 lines (22 loc) · 708 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
30
31
package io.jooby.i2240;
import static org.junit.jupiter.api.Assertions.assertEquals;
import io.jooby.di.GuiceModule;
import io.jooby.junit.ServerTest;
import io.jooby.junit.ServerTestRunner;
public class Issue2240 {
@ServerTest
public void shouldShareRegistryOnAppComposite(ServerTestRunner runner) {
runner.define(app -> {
app.install(new GuiceModule());
app.install(ChildApp2240::new);
app.get("/main", ctx -> app.require(Service2240.class).foo());
}).ready(http -> {
http.get("/main", rsp -> {
assertEquals("OK", rsp.body().string());
});
http.get("/child", rsp -> {
assertEquals("OK", rsp.body().string());
});
});
}
}