use of ninja.utils.MethodReference in project ninja by ninjaframework.
the class RouterImplTest method getReverseRouteWithMethodReference.
@Test
public void getReverseRouteWithMethodReference() {
String contextPath = "";
when(ninjaProperties.getContextPath()).thenReturn(contextPath);
String route = router.getReverseRoute(TestController.class, "ref");
String route2 = router.getReverseRoute(new MethodReference(TestController.class, "ref"));
assertThat(route, is("/ref"));
assertThat(route2, is("/ref"));
}
Aggregations