Tabnine Logo
WebService$Controller.description
Code IndexAdd Tabnine to your IDE (free)

How to use
description
method
in
org.sonar.api.server.ws.WebService$Controller

Best Java code snippets using org.sonar.api.server.ws.WebService$Controller.description (Showing top 20 results out of 315)

origin: SonarSource/sonarqube

@Test
public void define_controller() {
 assertThat(controller).isNotNull();
 assertThat(controller.description()).isNotEmpty();
 assertThat(controller.since()).isEqualTo("5.2");
 assertThat(controller.actions()).hasSize(2);
}
origin: SonarSource/sonarqube

@Test
public void definition() {
 assertThat(underTest.path()).isEqualTo("api/project_tags");
 assertThat(underTest.since()).isEqualTo("6.4");
 assertThat(underTest.description()).isNotEmpty();
}
origin: SonarSource/sonarqube

@Test
public void define_controller() {
 assertThat(controller).isNotNull();
 assertThat(controller.description()).isNotEmpty();
 assertThat(controller.since()).isEqualTo("3.6");
 assertThat(controller.actions()).hasSize(4);
}
origin: SonarSource/sonarqube

 @Test
 public void define_ws() {
  WebService.Controller controller = tester.controller("api/authentication");
  assertThat(controller).isNotNull();
  assertThat(controller.description()).isNotEmpty();
  assertThat(controller.actions()).hasSize(3);

  WebService.Action validate = controller.action("validate");
  assertThat(validate).isNotNull();
  assertThat(validate.handler()).isInstanceOf(ServletFilterHandler.class);
  assertThat(validate.responseExampleAsString()).isNotEmpty();
  assertThat(validate.params()).isEmpty();

  WebService.Action login = controller.action("login");
  assertThat(login).isNotNull();
  assertThat(login.handler()).isInstanceOf(ServletFilterHandler.class);
  assertThat(login.isPost()).isTrue();
  assertThat(login.params()).hasSize(2);

  WebService.Action logout = controller.action("logout");
  assertThat(logout).isNotNull();
  assertThat(logout.handler()).isInstanceOf(ServletFilterHandler.class);
  assertThat(logout.isPost()).isTrue();
  assertThat(logout.params()).isEmpty();
 }
}
origin: SonarSource/sonarqube

@Test
public void define_ws() {
 WsTester tester = new WsTester(underTest);
 WebService.Controller controller = tester.controller("api/webservices");
 assertThat(controller).isNotNull();
 assertThat(controller.path()).isEqualTo("api/webservices");
 assertThat(controller.since()).isEqualTo("4.2");
 assertThat(controller.description()).isNotEmpty();
 assertThat(controller.actions()).hasSize(2);
 WebService.Action index = controller.action("list");
 assertThat(index).isNotNull();
 assertThat(index.key()).isEqualTo("list");
 assertThat(index.handler()).isNotNull();
 assertThat(index.since()).isEqualTo("4.2");
 assertThat(index.isPost()).isFalse();
 assertThat(index.isInternal()).isFalse();
 assertThat(controller.action("response_example")).isNotNull();
}
origin: SonarSource/sonarqube

@Test
public void should_be_well_defined() {
 Controller controller = tester.controller(CONTROLLER_LANGUAGES);
 assertThat(controller).isNotNull();
 assertThat(controller.description()).isNotEmpty();
 assertThat(controller.isInternal()).isFalse();
 assertThat(controller.path()).isEqualTo(CONTROLLER_LANGUAGES);
 assertThat(controller.since()).isEqualTo("5.1");
 assertThat(controller.actions()).hasSize(1);
 Action list = controller.action(ACTION_LIST);
 assertThat(list).isNotNull();
 assertThat(list.description()).isNotEmpty();
 assertThat(list.handler()).isInstanceOf(ListAction.class);
 assertThat(list.isInternal()).isFalse();
 assertThat(list.isPost()).isFalse();
 assertThat(list.responseExampleAsString()).isNotEmpty();
 assertThat(list.params()).hasSize(2);
}
origin: SonarSource/sonarqube

private static void writeController(JsonWriter writer, WebService.Controller controller, boolean includeInternals) {
 if (includeInternals || !controller.isInternal()) {
  writer.beginObject();
  writer.prop("path", controller.path());
  writer.prop("since", controller.since());
  writer.prop("description", controller.description());
  // sort actions by key
  Ordering<WebService.Action> ordering = Ordering.natural().onResultOf(WebService.Action::key);
  writer.name("actions").beginArray();
  for (WebService.Action action : ordering.sortedCopy(controller.actions())) {
   writeAction(writer, action, includeInternals);
  }
  writer.endArray();
  writer.endObject();
 }
}
origin: SonarSource/sonarqube

@Test
public void verify_definition() {
 assertThat(wsTester.context().controllers()).hasSize(1);
 WebService.Controller controller = wsTester.context().controller("api/roots");
 assertThat(controller.description()).isEqualTo("Manage root users");
 assertThat(controller.since()).isEqualTo("6.2");
}
origin: SonarSource/sonarqube

@Test
public void define_controller() {
 assertThat(controller).isNotNull();
 assertThat(controller.since()).isEqualTo("2.10");
 assertThat(controller.description()).isNotEmpty();
 assertThat(controller.actions()).hasSize(1);
}
origin: SonarSource/sonarqube

@Test
public void defines_controller_and_binds_PluginsWsActions() {
 WebService.Controller controller = tester.controller("api/plugins");
 assertThat(controller).isNotNull();
 assertThat(controller.since()).isEqualTo("5.2");
 assertThat(controller.description()).isNotEmpty();
 assertThat(controller.actions()).extracting("key").containsOnly("dummy");
}
origin: SonarSource/sonarqube

@Test
public void define_controller() {
 assertThat(controller).isNotNull();
 assertThat(controller.since()).isEqualTo("2.10");
 assertThat(controller.description()).isNotEmpty();
 assertThat(controller.actions()).hasSize(1);
}
origin: SonarSource/sonarqube

 @Test
 public void define_controller() {
  WebService.Context context = new WebService.Context();
  new ComponentsWs(action).define(context);
  WebService.Controller controller = context.controller(CONTROLLER_COMPONENTS);

  assertThat(controller).isNotNull();
  assertThat(controller.description()).isNotEmpty();
  assertThat(controller.since()).isEqualTo("4.2");
  assertThat(controller.actions()).extracting(WebService.Action::key).containsExactly(actionKey);
 }
}
origin: SonarSource/sonarqube

@Test
public void define_ws() {
 WebService.Controller controller = tester.controller("api/user_properties");
 assertThat(controller).isNotNull();
 assertThat(controller.description()).isNotEmpty();
 assertThat(controller.actions()).hasSize(1);
}
origin: SonarSource/sonarqube

@Test
public void define_ws() {
 WebService.Controller controller = ws.controller("api/custom_measures");
 assertThat(controller).isNotNull();
 assertThat(controller.description()).isNotEmpty();
 assertThat(controller.actions()).hasSize(3);
}
origin: SonarSource/sonarqube

@Test
public void define_controller() {
 WebService.Controller controller = controller();
 assertThat(controller).isNotNull();
 assertThat(controller.path()).isEqualTo("api/profiles");
 assertThat(controller.description()).isNotEmpty();
 assertThat(controller.actions()).hasSize(2);
}
origin: SonarSource/sonarqube

@Test
public void define_controller() {
 WebService.Controller controller = tester.controller("api/updatecenter");
 assertThat(controller).isNotNull();
 assertThat(controller.since()).isEqualTo("2.10");
 assertThat(controller.description()).isNotEmpty();
 assertThat(controller.actions()).hasSize(1);
}
origin: SonarSource/sonarqube

@Test
public void test_definition() {
 WebhooksWsAction action = newFakeAction();
 WebhooksWs underTest = new WebhooksWs(action);
 WebService.Context context = new WebService.Context();
 underTest.define(context);
 WebService.Controller controller = context.controller("api/webhooks");
 assertThat(controller).isNotNull();
 assertThat(controller.description()).isNotEmpty();
 assertThat(controller.since()).isEqualTo("6.2");
}
origin: SonarSource/sonarqube

@Test
public void define_controller() {
 WebService.Controller controller = controller();
 assertThat(controller).isNotNull();
 assertThat(controller.description()).isNotEmpty();
 assertThat(controller.since()).isEqualTo("3.7");
 assertThat(controller.actions()).hasSize(2);
}
origin: SonarSource/sonarqube

@Test
public void define_ws() {
 WebService.Controller controller = ws.controller("api/metrics");
 assertThat(controller).isNotNull();
 assertThat(controller.description()).isNotEmpty();
 assertThat(controller.actions()).hasSize(6);
}
origin: SonarSource/sonarqube

@Test
public void test_definition() {
 ProjectBadgesWsAction action = createFakeAction();
 WebService.Context context = new WebService.Context();
 ProjectBadgesWs underTest = new ProjectBadgesWs(Collections.singletonList(action));
 underTest.define(context);
 WebService.Controller controller = context.controller("api/project_badges");
 assertThat(controller).isNotNull();
 assertThat(controller.description()).isNotEmpty();
 assertThat(controller.since()).isEqualTo("7.1");
}
org.sonar.api.server.wsWebService$Controllerdescription

Popular methods of WebService$Controller

  • actions
  • path
  • action
  • isInternal
    Returns true if all the actions are for internal use
  • since
  • <init>

Popular in Java

  • Start an intent from android
  • setContentView (Activity)
  • getSharedPreferences (Context)
  • getSystemService (Context)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • Path (java.nio.file)
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • Runner (org.openjdk.jmh.runner)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now