@Test public void shouldNotMatchIfAResourceHasTheWrongWebMethod() throws SecurityException { List<Route> routes = parser.rulesFor(new DefaultResourceClass(ClientsController.class)); Route route = getRouteMatching(routes, "/clients/remove"); assertThat(route.allowedMethods(), not(contains(HttpMethod.POST))); }
public List<Route> rulesFor(ResourceClass resource) { Class<?> baseType = resource.getType(); return registerRulesFor(baseType); }
PathAnnotationRoutesParser implements RoutesParser { public List<Route> rulesFor(ResourceClass resource) { Class<?> baseType = resource.getType(); return registerRulesFor(baseType); } }
PathAnnotationRoutesParser implements RoutesParser { public List<Route> rulesFor(ResourceClass resource) { Class<?> baseType = resource.getType(); return registerRulesFor(baseType); } PathAnnotationRoutesParser(Router router); }
PathAnnotationRoutesParser implements RoutesParser { public List<Route> rulesFor(ResourceClass resource) { Class<?> baseType = resource.getType(); return registerRulesFor(baseType); } PathAnnotationRoutesParser(Router router); List<Route> rulesFor(ResourceClass resource); }
PathAnnotationRoutesParser implements RoutesParser { public List<Route> rulesFor(ResourceClass resource) { Class<?> baseType = resource.getType(); return registerRulesFor(baseType); } PathAnnotationRoutesParser(Router router); List<Route> rulesFor(ResourceClass resource);  }