Package org.sonar.runner.api

Examples of org.sonar.runner.api.Runner.properties()


  public void should_create_embedded_runner_by_default() {
    props.setProperty("foo", "bar");
    Runner runner = new RunnerFactory().create(props);

    assertThat(runner).isInstanceOf(EmbeddedRunner.class);
    assertThat(runner.properties().get("foo")).isEqualTo("bar");
  }

  @Test
  public void should_create_forked_runner() {
    props.setProperty("foo", "bar");
View Full Code Here


    props.setProperty("sonarRunner.mode", "fork");
    props.setProperty("sonarRunner.fork.jvmArgs", "-Xms128m -Xmx512m");
    Runner runner = new RunnerFactory().create(props);

    assertThat(runner).isInstanceOf(ForkedRunner.class);
    assertThat(runner.properties().get("foo")).isEqualTo("bar");
    assertThat(((ForkedRunner)runner).jvmArguments()).contains("-Xms128m", "-Xmx512m");
  }

  @Test
    public void should_create_forked_runner_with_jvm_arguments() {
View Full Code Here

      props.setProperty("foo", "bar");
      props.setProperty("sonarRunner.mode", "fork");
      Runner runner = new RunnerFactory().create(props);

      assertThat(runner).isInstanceOf(ForkedRunner.class);
      assertThat(runner.properties().get("foo")).isEqualTo("bar");
      assertThat(((ForkedRunner)runner).jvmArguments()).isEmpty();
    }
}
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.