Codota Logo
WebService$Controller.since
Code IndexAdd Codota to your IDE (free)

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

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

  • Common ways to obtain WebService$Controller
private void myMethod () {
WebService$Controller w =
  • Codota IconWebService.Context webServiceContext;String key;webServiceContext.controller(key)
  • Smart code suggestions by Codota
}
origin: SonarSource/sonarqube

 @Test
 public void define_ws() {
  WebService.Controller controller = ws.controller("api/measures");

  assertThat(controller).isNotNull();
  assertThat(controller.since()).isEqualTo("5.4");
 }
}
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_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.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_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() {
 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 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.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 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

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 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

@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 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

WebService.Controller controller = tester.controller("api/sources");
assertThat(controller).isNotNull();
assertThat(controller.since()).isEqualTo("4.2");
assertThat(controller.description()).isNotEmpty();
assertThat(controller.actions()).hasSize(4);
origin: SonarSource/sonarqube

assertThat(controller.path()).isEqualTo("api/metric");
assertThat(controller.description()).isEqualTo("Metrics");
assertThat(controller.since()).isEqualTo("3.2");
assertThat(controller.actions()).hasSize(2);
assertThat(controller.isInternal()).isFalse();
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");
}
origin: org.sonarsource.sonarqube/sonar-server

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 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");
}
org.sonar.api.server.wsWebService$Controllersince

Popular methods of WebService$Controller

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

Popular in Java

  • Reading from database using SQL prepared statement
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • getContentResolver (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate(i
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now