Package org.sonar.api.config

Examples of org.sonar.api.config.Settings


    verify(issuable, times(1)).addIssue(any(Issue.class));
  }

  @Test
  public void shouldReportProjectLevelViolations() {
    Settings settings = new Settings();
    settings.setProperty(CxxPCLintSensor.REPORT_PATH_KEY, "pclint-reports/pclint-result-projectlevelviolation.xml");
    CxxPCLintSensor sensor = new CxxPCLintSensor(perspectives, settings, fs, profile);
    sensor.analyse(project, context);
    verify(issuable, times(1)).addIssue(any(Issue.class));
  }
View Full Code Here


    verify(issuable, times(1)).addIssue(any(Issue.class));
  }

  @Test
  public void shouldThrowExceptionInvalidChar() {
    Settings settings = new Settings();
    settings.setProperty(CxxPCLintSensor.REPORT_PATH_KEY, "pclint-reports/pclint-result-invalid-char.xml");
    CxxPCLintSensor sensor = new CxxPCLintSensor(perspectives, settings, fs, profile);
    sensor.analyse(project, context);
  }
View Full Code Here

  private ModuleFileSystem fileSystem = mock(ModuleFileSystem.class);
  private Project project;

  @Before
  public void init() {
    settings = new Settings();
    settings.setProperty(JavaScriptPlugin.LCOV_REPORT_PATH, "jsTestDriver.conf-coverage.dat");
    sensor = new CoverageSensor(fileSystem, settings);
    context = mock(SensorContext.class);
    project = mockProject();
  }
View Full Code Here

  private Settings settings;
  private JavaScript javaScript;

  @Before
  public void setUp() {
    settings = new Settings();
    javaScript = new JavaScript(settings);
  }
View Full Code Here

  private Settings settings;
  private JsTestSensor sensor;

  @Before
  public void setUp() {
    settings = new Settings();
    sensor = new JsTestSensor(mockFileSystem(), settings);
  }
View Full Code Here

  private Settings settings;
  private ModuleFileSystem fileSystem = mock(ModuleFileSystem.class);

  @Before
  public void init() {
    settings = new Settings();
    sensor = new JsTestDriverSensor(fileSystem, settings);
    context = mock(SensorContext.class);
  }
View Full Code Here

  @Test
  public void migrate_violations() throws Exception {
    db.prepareDbUnit(getClass(), "migrate_violations.xml");

    new ViolationMigration(db.database(), new Settings()).execute();

    db.assertDbUnit(getClass(), "migrate_violations_result.xml", "issues", "issue_changes");
    assertMigrationEnded();
  }
View Full Code Here

  @Test
  public void no_violations_to_migrate() throws Exception {
    db.prepareDbUnit(getClass(), "no_violations_to_migrate.xml");

    new ViolationMigration(db.database(), new Settings()).execute();

    db.assertDbUnit(getClass(), "no_violations_to_migrate_result.xml", "issues", "issue_changes");
    assertMigrationEnded();
  }
View Full Code Here

public class ViolationConvertersTest {

  @Test
  public void default_number_of_threads() throws Exception {
    assertThat(new ViolationConverters(new Settings()).numberOfThreads()).isEqualTo(ViolationConverters.DEFAULT_THREADS);
  }
View Full Code Here

    assertThat(new ViolationConverters(new Settings()).numberOfThreads()).isEqualTo(ViolationConverters.DEFAULT_THREADS);
  }

  @Test
  public void configure_number_of_threads() throws Exception {
    Settings settings = new Settings();
    settings.setProperty(ViolationConverters.THREADS_PROPERTY, 2);
    assertThat(new ViolationConverters(settings).numberOfThreads()).isEqualTo(2);
  }
View Full Code Here

TOP

Related Classes of org.sonar.api.config.Settings

Copyright © 2018 www.massapicom. 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.