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

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

Best Java code snippets using org.sonar.api.server.ws.WebService$Controller.actions (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 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() {
 assertThat(controller).isNotNull();
 assertThat(controller.description()).isNotEmpty();
 assertThat(controller.since()).isEqualTo("3.6");
 assertThat(controller.actions()).hasSize(4);
}
origin: SonarSource/sonarqube

@Test
public void action_available_is_defined() {
 logInAsSystemAdministrator();
 WsTester wsTester = new WsTester();
 WebService.NewController newController = wsTester.context().createController(DUMMY_CONTROLLER_KEY);
 underTest.define(newController);
 newController.done();
 WebService.Controller controller = wsTester.controller(DUMMY_CONTROLLER_KEY);
 assertThat(controller.actions()).extracting("key").containsExactly("available");
 WebService.Action action = controller.actions().iterator().next();
 assertThat(action.isPost()).isFalse();
 assertThat(action.description()).isNotEmpty();
 assertThat(action.responseExample()).isNotNull();
}
origin: SonarSource/sonarqube

@Test
public void action_cancel_all_is_defined() {
 WsTester wsTester = new WsTester();
 WebService.NewController newController = wsTester.context().createController(DUMMY_CONTROLLER_KEY);
 underTest.define(newController);
 newController.done();
 WebService.Controller controller = wsTester.controller(DUMMY_CONTROLLER_KEY);
 assertThat(controller.actions()).extracting("key").containsExactly("cancel_all");
 WebService.Action action = controller.actions().iterator().next();
 assertThat(action.isPost()).isTrue();
 assertThat(action.description()).isNotEmpty();
 assertThat(action.responseExample()).isNull();
 assertThat(action.params()).isEmpty();
}
origin: SonarSource/sonarqube

@Test
public void action_updates_is_defined() {
 WsTester wsTester = new WsTester();
 WebService.NewController newController = wsTester.context().createController(DUMMY_CONTROLLER_KEY);
 underTest.define(newController);
 newController.done();
 WebService.Controller controller = wsTester.controller(DUMMY_CONTROLLER_KEY);
 assertThat(controller.actions()).extracting("key").containsExactly("upgrades");
 WebService.Action action = controller.actions().iterator().next();
 assertThat(action.isPost()).isFalse();
 assertThat(action.description()).isNotEmpty();
 assertThat(action.responseExample()).isNotNull();
 assertThat(action.params()).isEmpty();
}
origin: SonarSource/sonarqube

@Test
public void action_pending_is_defined() {
 logInAsSystemAdministrator();
 WsTester wsTester = new WsTester();
 WebService.NewController newController = wsTester.context().createController(DUMMY_CONTROLLER_KEY);
 underTest.define(newController);
 newController.done();
 WebService.Controller controller = wsTester.controller(DUMMY_CONTROLLER_KEY);
 assertThat(controller.actions()).extracting("key").containsExactly("pending");
 WebService.Action action = controller.actions().iterator().next();
 assertThat(action.isPost()).isFalse();
 assertThat(action.description()).isNotEmpty();
 assertThat(action.responseExample()).isNotNull();
}
origin: SonarSource/sonarqube

@Test
public void action_updatable_is_defined() {
 logInAsSystemAdministrator();
 WsTester wsTester = new WsTester();
 WebService.NewController newController = wsTester.context().createController(DUMMY_CONTROLLER_KEY);
 underTest.define(newController);
 newController.done();
 WebService.Controller controller = wsTester.controller(DUMMY_CONTROLLER_KEY);
 assertThat(controller.actions()).extracting("key").containsExactly("updates");
 WebService.Action action = controller.actions().iterator().next();
 assertThat(action.isPost()).isFalse();
 assertThat(action.description()).isNotEmpty();
 assertThat(action.responseExample()).isNotNull();
}
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() {
  RestartAction action1 = new RestartAction(mock(UserSession.class), mock(ProcessCommandWrapper.class),
   mock(RestartFlagHolder.class), mock(WebServer.class));
  InfoAction action2 = new InfoAction(new AnonymousMockUserSession(), mock(SystemInfoWriter.class));
  SystemWs ws = new SystemWs(action1, action2);
  WebService.Context context = new WebService.Context();

  ws.define(context);

  assertThat(context.controllers()).hasSize(1);
  assertThat(context.controller("api/system").actions()).hasSize(2);
  assertThat(context.controller("api/system").action("info")).isNotNull();
 }
}
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_version_action() {
 WebService.Controller controller = tester.controller("api/server");
 assertThat(controller.actions()).hasSize(1);
 WebService.Action versionAction = controller.action("version");
 assertThat(versionAction.since()).isEqualTo("2.10");
 assertThat(versionAction.description()).isNotEmpty();
 assertThat(versionAction.isPost()).isFalse();
}
origin: SonarSource/sonarqube

public WsActionTester(WsAction wsAction) {
 WebService.Context context = new WebService.Context();
 WebService.NewController newController = context.createController(CONTROLLER_KEY);
 wsAction.define(newController);
 newController.done();
 action = Iterables.get(context.controller(CONTROLLER_KEY).actions(), 0);
}
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 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.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);
}
org.sonar.api.server.wsWebService$Controlleractions

Popular methods of WebService$Controller

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

Popular in Java

  • Start an intent from android
  • onCreateOptionsMenu (Activity)
  • getExternalFilesDir (Context)
  • setScale (BigDecimal)
  • Menu (java.awt)
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • From CI to AI: The AI layer in your organization
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