Examples of DefaultBeanClass


Examples of br.com.caelum.vraptor.controller.DefaultBeanClass


  }
  @Test
  public void addsAPrefixToMethodsWhenTheControllerAndTheMethodAreAnnotatedWithEmptyPath() throws Exception {
    List<Route> routes = parser.rulesFor(new DefaultBeanClass(PathAnnotatedController.class));
    Route route = getRouteMatching(routes, "/prefix");

    assertThat(route, canHandle(PathAnnotatedController.class, "withEmptyPath"));

View Full Code Here

Examples of br.com.caelum.vraptor.controller.DefaultBeanClass


  }
  @Test
  public void addsAPrefixToMethodsWhenTheControllerIsAnnotatedWithPath() throws Exception {
    List<Route> routes = parser.rulesFor(new DefaultBeanClass(PathAnnotatedController.class));
    Route route = getRouteMatching(routes, "/prefix/withoutPath");

    assertThat(route, canHandle(PathAnnotatedController.class, "withoutPath"));

  }
View Full Code Here

Examples of br.com.caelum.vraptor.controller.DefaultBeanClass

    assertThat(route, canHandle(PathAnnotatedController.class, "withoutPath"));

  }
  @Test
  public void findsTheCorrectAnnotatedMethodIfThereIsNoWebMethodAnnotationPresent() throws Exception {
    List<Route> routes = parser.rulesFor(new DefaultBeanClass(ClientsController.class));
    Route route = getRouteMatching(routes, "/clients");
    assertThat(route, canHandle(ClientsController.class, "list"));
  }
View Full Code Here

Examples of br.com.caelum.vraptor.controller.DefaultBeanClass

  }

  @Test
  public void suportsTheDefaultNameForANonAnnotatedMethod() throws SecurityException,
      NoSuchMethodException {
    List<Route> routes = parser.rulesFor(new DefaultBeanClass(ClientsController.class));
    Route route = getRouteMatching(routes, "/clients/add");

    assertThat(route, canHandle(ClientsController.class, "add"));

View Full Code Here

Examples of br.com.caelum.vraptor.controller.DefaultBeanClass

  }

  @Test
  public void ignoresTheControllerSuffixForANonAnnotatedMethod() throws SecurityException,
      NoSuchMethodException {
    List<Route> routes = parser.rulesFor(new DefaultBeanClass(ClientsController.class));
    Route route = getRouteMatching(routes, "/clients/add");

    assertThat(route, canHandle(ClientsController.class, "add"));

View Full Code Here

Examples of br.com.caelum.vraptor.controller.DefaultBeanClass


  }
  @Test
  public void addsASlashWhenUserForgotIt() throws SecurityException,  NoSuchMethodException {
    List<Route> routes = parser.rulesFor(new DefaultBeanClass(ClientsController.class));
    Route route = getRouteMatching(routes, "/noSlash");

    assertThat(route, canHandle(ClientsController.class, "noSlash"));

View Full Code Here

Examples of br.com.caelum.vraptor.controller.DefaultBeanClass

  }

  @Test
  public void matchesWhenUsingAWildcard() throws SecurityException, NoSuchMethodException {
    List<Route> routes = parser.rulesFor(new DefaultBeanClass(ClientsController.class));
    Route route = getRouteMatching(routes, "/move/second/child");

    assertThat(route, canHandle(ClientsController.class, "move"));

  }
View Full Code Here

Examples of br.com.caelum.vraptor.controller.DefaultBeanClass

  }

  @Test
  public void dontRegisterRouteIfMethodIsNotPublic() {
    List<Route> routes = parser.rulesFor(new DefaultBeanClass(ClientsController.class));
    Route route = getRouteMatching(routes, "/protectMe");
    assertNull(route);

  }
View Full Code Here

Examples of br.com.caelum.vraptor.controller.DefaultBeanClass

  }

  @Test
  public void dontRegisterRouteIfMethodIsStatic() {
    List<Route> routes = parser.rulesFor(new DefaultBeanClass(ClientsController.class));
    Route route = getRouteMatching(routes, "/staticMe");
    assertNull(route);

  }
View Full Code Here

Examples of br.com.caelum.vraptor.controller.DefaultBeanClass

  public void shouldThrowExceptionIfPathAnnotationHasEmptyArray()
      throws Exception {
    exception.expect(IllegalArgumentException.class);
    exception.expectMessage(containsString("You must specify at least one path on @Path at"));

    parser.rulesFor(new DefaultBeanClass(NoPath.class));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.