aboutsummaryrefslogtreecommitdiffstats
path: root/sonar-batch/src/test
diff options
context:
space:
mode:
authorJenkins CI <ci@sonarsource.com>2015-01-06 08:00:52 +0100
committerJenkins CI <ci@sonarsource.com>2015-01-06 08:00:52 +0100
commit523b95f37f4698f89bb5b8b97ed662f49fc4e39b (patch)
treef4b012ce342f82636be4a88718f5db0b6a1fefb8 /sonar-batch/src/test
parenta1fcae0eaf6d0ab06296973d346c182cefde54d1 (diff)
parent551a7b41125fba4a3603c9367e9bb1c7013bd310 (diff)
downloadsonarqube-523b95f37f4698f89bb5b8b97ed662f49fc4e39b.tar.gz
sonarqube-523b95f37f4698f89bb5b8b97ed662f49fc4e39b.zip
Automatic merge from branch-5.0
* origin/branch-5.0: SONAR-5753 Save empty string instead of null for root projects Remove wront comment about file.encoding=UTF-8 in sonar.properties
Diffstat (limited to 'sonar-batch/src/test')
-rw-r--r--sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java10
-rw-r--r--sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldRemoveRootIndexIfResourceIsProject-result.xml2
-rw-r--r--sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldUpdateExistingResource-result.xml2
3 files changed, 7 insertions, 7 deletions
diff --git a/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java b/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java
index d99ef18c058..af3a7f3904c 100644
--- a/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java
+++ b/sonar-batch/src/test/java/org/sonar/batch/index/DefaultResourcePersisterTest.java
@@ -120,7 +120,7 @@ public class DefaultResourcePersisterTest extends AbstractDbUnitTestCase {
assertThat(newProject.uuid()).isNotNull();
assertThat(newProject.projectUuid()).isEqualTo(newProject.uuid());
assertThat(newProject.moduleUuid()).isNull();
- assertThat(newProject.moduleUuidPath()).isNull();
+ assertThat(newProject.moduleUuidPath()).isEqualTo("");
// SONAR-3636 : created_at must be fed when inserting a new entry in the 'projects' table
assertThat(newProject.getCreatedAt()).isNotNull();
} finally {
@@ -145,7 +145,7 @@ public class DefaultResourcePersisterTest extends AbstractDbUnitTestCase {
assertThat(newProject.uuid()).isNotNull();
assertThat(newProject.projectUuid()).isEqualTo(newProject.uuid());
assertThat(newProject.moduleUuid()).isNull();
- assertThat(newProject.moduleUuidPath()).isNull();
+ assertThat(newProject.moduleUuidPath()).isEqualTo("");
} finally {
MyBatis.closeQuietly(session);
}
@@ -181,7 +181,7 @@ public class DefaultResourcePersisterTest extends AbstractDbUnitTestCase {
assertThat(root.uuid()).isNotNull();
assertThat(root.projectUuid()).isEqualTo(root.uuid());
assertThat(root.moduleUuid()).isNull();
- assertThat(root.moduleUuidPath()).isNull();
+ assertThat(root.moduleUuidPath()).isEqualTo("");
ComponentDto a = session.getMapper(ComponentMapper.class).selectByKey("a");
assertThat(a.uuid()).isNotNull();
assertThat(a.projectUuid()).isEqualTo(root.uuid());
@@ -259,7 +259,7 @@ public class DefaultResourcePersisterTest extends AbstractDbUnitTestCase {
assertThat(root.uuid()).isNotNull();
assertThat(root.projectUuid()).isEqualTo(root.uuid());
assertThat(root.moduleUuid()).isNull();
- assertThat(root.moduleUuidPath()).isNull();
+ assertThat(root.moduleUuidPath()).isEqualTo("");
ComponentDto a = session.getMapper(ComponentMapper.class).selectByKey("a");
System.out.println("A: " + a.uuid());
assertThat(a.uuid()).isNotNull();
@@ -352,7 +352,7 @@ public class DefaultResourcePersisterTest extends AbstractDbUnitTestCase {
assertThat(newLib.uuid()).isNotNull();
assertThat(newLib.projectUuid()).isEqualTo(newLib.uuid());
assertThat(newLib.moduleUuid()).isNull();
- assertThat(newLib.moduleUuidPath()).isNull();
+ assertThat(newLib.moduleUuidPath()).isEqualTo("");
} finally {
MyBatis.closeQuietly(session);
}
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldRemoveRootIndexIfResourceIsProject-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldRemoveRootIndexIfResourceIsProject-result.xml
index f36a8e48f96..283baaf3dde 100644
--- a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldRemoveRootIndexIfResourceIsProject-result.xml
+++ b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldRemoveRootIndexIfResourceIsProject-result.xml
@@ -1,6 +1,6 @@
<dataset>
- <projects id="1001" scope="PRJ" qualifier="TRK" kee="foo" root_id="[null]" uuid="BCDE" project_uuid="BCDE" module_uuid="[null]" module_uuid_path="[null]"
+ <projects id="1001" scope="PRJ" qualifier="TRK" kee="foo" root_id="[null]" uuid="BCDE" project_uuid="BCDE" module_uuid="[null]" module_uuid_path=""
name="Foo" long_name="Foo" description="some description"
enabled="true" language="[null]" copy_resource_id="[null]" person_id="[null]" created_at="[null]" path="[null]" deprecated_kee="foo"/>
diff --git a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldUpdateExistingResource-result.xml b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldUpdateExistingResource-result.xml
index cca8b5570dc..d04674f42b8 100644
--- a/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldUpdateExistingResource-result.xml
+++ b/sonar-batch/src/test/resources/org/sonar/batch/index/DefaultResourcePersisterTest/shouldUpdateExistingResource-result.xml
@@ -1,6 +1,6 @@
<dataset>
- <projects id="1001" scope="PRJ" qualifier="TRK" kee="foo" root_id="[null]" uuid="BCDE" project_uuid="BCDE" module_uuid="[null]" module_uuid_path="[null]"
+ <projects id="1001" scope="PRJ" qualifier="TRK" kee="foo" root_id="[null]" uuid="BCDE" project_uuid="BCDE" module_uuid="[null]" module_uuid_path=""
name="new name" long_name="new name" description="new description"
enabled="true" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]" deprecated_kee="foo" />