예제 #1
0
  @Test
  public void define_search_action() throws Exception {
    WebService.Controller controller = tester.controller("api/action_plans");

    WebService.Action action = controller.action("search");
    assertThat(action).isNotNull();
    assertThat(action.handler()).isInstanceOf(RailsHandler.class);
    assertThat(action.responseExampleAsString()).isNotEmpty();
    assertThat(action.params()).hasSize(2);
  }
예제 #2
0
 @Test
 public void define_suggestions_action() throws Exception {
   WebService.Action action = controller.action("suggestions");
   assertThat(action).isNotNull();
   assertThat(action.isInternal()).isTrue();
   assertThat(action.isPost()).isFalse();
   assertThat(action.handler()).isInstanceOf(RailsHandler.class);
   assertThat(action.responseExampleAsString()).isNotEmpty();
   assertThat(action.params()).hasSize(2);
 }