Package org.sonar.api.config

Examples of org.sonar.api.config.PropertyDefinitions


  @Before
  public void init() throws URISyntaxException {
    dao = mock(PropertiesDao.class);

    settings = new ServerSettings(
      new PropertyDefinitions(),
      new Properties());
  }
View Full Code Here


  public ComponentContainer() {
    this.parent = null;
    this.child = null;
    this.pico = createPicoContainer();
    this.componentKeys = new ComponentKeys();
    propertyDefinitions = new PropertyDefinitions();
    addSingleton(propertyDefinitions);
    addSingleton(this);
  }
View Full Code Here

  @Test
  public void should_load_global_settings() {
    globalRef.globalSettings().put("sonar.cpd.cross", "true");

    GlobalSettings batchSettings = new GlobalSettings(bootstrapProps, new PropertyDefinitions(), globalRef, mode);

    assertThat(batchSettings.getBoolean("sonar.cpd.cross")).isTrue();
  }
View Full Code Here

  @Test
  public void shouldDeclareComponentProperties() {
    ComponentContainer container = new ComponentContainer();
    container.addSingleton(ComponentWithProperty.class);

    PropertyDefinitions propertyDefinitions = container.getComponentByType(PropertyDefinitions.class);
    assertThat(propertyDefinitions.get("foo")).isNotNull();
    assertThat(propertyDefinitions.get("foo").defaultValue()).isEqualTo("bar");
  }
View Full Code Here

  public void shouldDeclareExtensionWithoutAddingIt() {
    ComponentContainer container = new ComponentContainer();
    PluginMetadata plugin = mock(PluginMetadata.class);
    container.declareExtension(plugin, ComponentWithProperty.class);

    PropertyDefinitions propertyDefinitions = container.getComponentByType(PropertyDefinitions.class);
    assertThat(propertyDefinitions.get("foo")).isNotNull();
    assertThat(container.getComponentByType(ComponentWithProperty.class)).isNull();
  }
View Full Code Here

  public void shouldDeclareExtensionWhenAdding() {
    ComponentContainer container = new ComponentContainer();
    PluginMetadata plugin = mock(PluginMetadata.class);
    container.addExtension(plugin, ComponentWithProperty.class);

    PropertyDefinitions propertyDefinitions = container.getComponentByType(PropertyDefinitions.class);
    assertThat(propertyDefinitions.get("foo")).isNotNull();
    assertThat(container.getComponentByType(ComponentWithProperty.class)).isNotNull();
    assertThat(container.getComponentByKey(ComponentWithProperty.class)).isNotNull();
  }
View Full Code Here

  private Settings settings;

  @Before
  public void init() {
    settings = new Settings(new PropertyDefinitions(IssueExclusionProperties.all()));
    patternsInitializer = new IssueInclusionPatternInitializer(settings);
  }
View Full Code Here

  private Settings settings;

  @Before
  public void init() {
    settings = new Settings(new PropertyDefinitions(IssueExclusionProperties.all()));
    patternsInitializer = new IssueExclusionPatternInitializer(settings);
  }
View Full Code Here

TOP

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

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.