forked from jooby-project/jooby
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIssue1525.java
More file actions
25 lines (21 loc) · 837 Bytes
/
Copy pathIssue1525.java
File metadata and controls
25 lines (21 loc) · 837 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
package tests;
import io.jooby.Route;
import io.jooby.apt.MvcModuleCompilerRunner;
import org.junit.jupiter.api.Test;
import source.RouteClassAttributes;
import static org.junit.jupiter.api.Assertions.assertEquals;
public class Issue1525 {
@Test
public void routeClassAttributes() throws Exception {
new MvcModuleCompilerRunner(new RouteClassAttributes())
.module(app -> {
Route route0 = app.getRoutes().get(0);
assertEquals(2, route0.getAttributes().size(), route0.getAttributes().toString());
assertEquals("Admin", route0.attribute("roleAnnotation"));
Route route1 = app.getRoutes().get(1);
assertEquals(2, route1.getAttributes().size(), route1.getAttributes().toString());
assertEquals("User", route1.attribute("roleAnnotation"));
})
;
}
}