aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch
diff options
context:
space:
mode:
authorJulien Lancelot <julien.lancelot@gmail.com>2013-04-24 12:19:11 +0200
committerJulien Lancelot <julien.lancelot@gmail.com>2013-04-24 12:19:23 +0200
commitabd786d2c5185b0b130122058a50cadb4702a6a0 (patch)
tree8741562c1c9ea0bf2282cf89b9beb1426c756a95 /sonar-batch
parent7c1aab8ce34614c06904f1dce7fafd4b3e52c0bc (diff)
downloadsonarqube-abd786d2c5185b0b130122058a50cadb4702a6a0.tar.gz
sonarqube-abd786d2c5185b0b130122058a50cadb4702a6a0.zip
Rename PropertyDefinitions to PropertyDefs and PropertyFieldDefinition to PropertyFieldDef
Diffstat (limited to 'sonar-batch')
-rw-r--r--sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchSettings.java6
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchSettingsTest.java18
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/scan/ModuleSettingsTest.java4
3 files changed, 14 insertions, 14 deletions
diff --git a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchSettings.java b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchSettings.java
index 72d038aa58d..1bedd4b6b99 100644
--- a/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchSettings.java
+++ b/sonar-batch/src/main/java/org/sonar/batch/bootstrap/BatchSettings.java
@@ -26,7 +26,7 @@ import org.json.simple.JSONValue;
import org.slf4j.LoggerFactory;
import org.sonar.api.CoreProperties;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
-import org.sonar.api.config.PropertyDefinitions;
+import org.sonar.api.config.PropertyDefs;
import org.sonar.api.config.Settings;
import javax.annotation.Nullable;
@@ -44,9 +44,9 @@ public class BatchSettings extends Settings {
private final BootstrapSettings bootstrapSettings;
private final ServerClient client;
- public BatchSettings(BootstrapSettings bootstrapSettings, PropertyDefinitions propertyDefinitions,
+ public BatchSettings(BootstrapSettings bootstrapSettings, PropertyDefs propertyDefs,
ServerClient client, Configuration deprecatedConfiguration) {
- super(propertyDefinitions);
+ super(propertyDefs);
this.bootstrapSettings = bootstrapSettings;
this.client = client;
this.deprecatedConfiguration = deprecatedConfiguration;
diff --git a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchSettingsTest.java b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchSettingsTest.java
index 7ac5b3ba19b..870a88002b2 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchSettingsTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/bootstrap/BatchSettingsTest.java
@@ -23,7 +23,7 @@ import org.apache.commons.configuration.BaseConfiguration;
import org.apache.commons.configuration.Configuration;
import org.junit.Test;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
-import org.sonar.api.config.PropertyDefinitions;
+import org.sonar.api.config.PropertyDefs;
import java.util.Collections;
import java.util.Map;
@@ -52,7 +52,7 @@ public class BatchSettingsTest {
// Reconstruct bootstrap settings to get system property
bootstrapSettings = new BootstrapSettings(new BootstrapProperties(Collections.<String, String> emptyMap()));
- BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefinitions(), client, deprecatedConf);
+ BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefs(), client, deprecatedConf);
assertThat(batchSettings.getString("BatchSettingsTest.testSystemProp")).isEqualTo("system");
}
@@ -63,7 +63,7 @@ public class BatchSettingsTest {
when(client.request("/batch_bootstrap/properties?project=struts")).thenReturn(REACTOR_JSON_RESPONSE);
project.setProperty("project.prop", "project");
- BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefinitions(), client, deprecatedConf);
+ BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefs(), client, deprecatedConf);
batchSettings.init(project);
assertThat(batchSettings.getString("project.prop")).isEqualTo("project");
@@ -73,7 +73,7 @@ public class BatchSettingsTest {
public void should_load_global_settings() {
when(client.request("/batch_bootstrap/properties")).thenReturn(JSON_RESPONSE);
- BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefinitions(), client, deprecatedConf);
+ BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefs(), client, deprecatedConf);
assertThat(batchSettings.getBoolean("sonar.cpd.cross")).isTrue();
}
@@ -83,7 +83,7 @@ public class BatchSettingsTest {
when(client.request("/batch_bootstrap/properties")).thenReturn(JSON_RESPONSE);
when(client.request("/batch_bootstrap/properties?project=struts")).thenReturn(REACTOR_JSON_RESPONSE);
- BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefinitions(), client, deprecatedConf);
+ BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefs(), client, deprecatedConf);
batchSettings.init(project);
assertThat(batchSettings.getString("sonar.java.coveragePlugin")).isEqualTo("jacoco");
@@ -94,7 +94,7 @@ public class BatchSettingsTest {
when(client.request("/batch_bootstrap/properties")).thenReturn(JSON_RESPONSE);
when(client.request("/batch_bootstrap/properties?project=struts")).thenReturn(REACTOR_JSON_RESPONSE);
- BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefinitions(), client, deprecatedConf);
+ BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefs(), client, deprecatedConf);
batchSettings.init(project);
Map<String, String> moduleSettings = batchSettings.getModuleProperties("struts-core");
@@ -109,7 +109,7 @@ public class BatchSettingsTest {
System.setProperty("BatchSettingsTest.testSystemProp", "system");
project.setProperty("BatchSettingsTest.testSystemProp", "build");
- BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefinitions(), client, deprecatedConf);
+ BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefs(), client, deprecatedConf);
assertThat(batchSettings.getString("BatchSettingsTest.testSystemProp")).isEqualTo("system");
}
@@ -119,7 +119,7 @@ public class BatchSettingsTest {
when(client.request("/batch_bootstrap/properties")).thenReturn(JSON_RESPONSE);
when(client.request("/batch_bootstrap/properties?project=struts")).thenReturn(REACTOR_JSON_RESPONSE);
- BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefinitions(), client, deprecatedConf);
+ BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefs(), client, deprecatedConf);
batchSettings.init(project);
assertThat(deprecatedConf.getString("sonar.cpd.cross")).isEqualTo("true");
@@ -137,7 +137,7 @@ public class BatchSettingsTest {
@Test
public void project_should_be_optional() {
when(client.request("/batch_bootstrap/properties")).thenReturn(JSON_RESPONSE);
- BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefinitions(), client, deprecatedConf);
+ BatchSettings batchSettings = new BatchSettings(bootstrapSettings, new PropertyDefs(), client, deprecatedConf);
assertThat(batchSettings.getProperties()).isNotEmpty();
}
}
diff --git a/sonar-batch/src/test/java/org/sonar/batch/scan/ModuleSettingsTest.java b/sonar-batch/src/test/java/org/sonar/batch/scan/ModuleSettingsTest.java
index e3487f6dd79..1207c93e7f8 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/scan/ModuleSettingsTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/scan/ModuleSettingsTest.java
@@ -24,7 +24,7 @@ import org.apache.commons.configuration.Configuration;
import org.apache.commons.configuration.PropertiesConfiguration;
import org.junit.Test;
import org.sonar.api.batch.bootstrap.ProjectDefinition;
-import org.sonar.api.config.PropertyDefinitions;
+import org.sonar.api.config.PropertyDefs;
import org.sonar.batch.bootstrap.BatchSettings;
import java.util.List;
@@ -52,7 +52,7 @@ public class ModuleSettingsTest {
@Test
public void test_loading_of_module_settings() {
BatchSettings batchSettings = mock(BatchSettings.class);
- when(batchSettings.getDefinitions()).thenReturn(new PropertyDefinitions());
+ when(batchSettings.getDefinitions()).thenReturn(new PropertyDefs());
when(batchSettings.getProperties()).thenReturn(ImmutableMap.of(
"overridding", "batch",
"on-batch", "true"