diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-06-17 18:57:35 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2015-06-17 18:57:35 +0200 |
commit | 183b104dadd5b350d4d00a1ef2336094755e5f4f (patch) | |
tree | 49c689ced61ffcae43f93bfb0ddcf4d4f17571c6 /sonar-plugin-api/src/test | |
parent | 8714a329c98b2610cf54632400e33447b7bf7448 (diff) | |
download | sonarqube-183b104dadd5b350d4d00a1ef2336094755e5f4f.tar.gz sonarqube-183b104dadd5b350d4d00a1ef2336094755e5f4f.zip |
Remove Hibernate entity "MeasureModel"
Diffstat (limited to 'sonar-plugin-api/src/test')
-rw-r--r-- | sonar-plugin-api/src/test/java/org/sonar/api/database/model/MeasureModelTest.java | 37 | ||||
-rw-r--r-- | sonar-plugin-api/src/test/java/org/sonar/api/database/model/SnapshotTest.java | 29 |
2 files changed, 3 insertions, 63 deletions
diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/database/model/MeasureModelTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/database/model/MeasureModelTest.java deleted file mode 100644 index b78feea7328..00000000000 --- a/sonar-plugin-api/src/test/java/org/sonar/api/database/model/MeasureModelTest.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * SonarQube, open source software quality management tool. - * Copyright (C) 2008-2014 SonarSource - * mailto:contact AT sonarsource DOT com - * - * SonarQube is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 3 of the License, or (at your option) any later version. - * - * SonarQube is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - */ -package org.sonar.api.database.model; - -import org.junit.Test; -import org.sonar.api.measures.CoreMetrics; - -import static org.assertj.core.api.Assertions.assertThat; - -public class MeasureModelTest { - @Test - public void text_is_utf8() { - String s = "accents éà and special characters ç€"; - - MeasureModel measure = new MeasureModel(); - measure.setData(s); - - assertThat(measure.getData(CoreMetrics.DUPLICATIONS_DATA)).isEqualTo(s); - } -} diff --git a/sonar-plugin-api/src/test/java/org/sonar/api/database/model/SnapshotTest.java b/sonar-plugin-api/src/test/java/org/sonar/api/database/model/SnapshotTest.java index 148572c83fb..adcbe3466a3 100644 --- a/sonar-plugin-api/src/test/java/org/sonar/api/database/model/SnapshotTest.java +++ b/sonar-plugin-api/src/test/java/org/sonar/api/database/model/SnapshotTest.java @@ -21,8 +21,9 @@ package org.sonar.api.database.model; import org.junit.Test; -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; public class SnapshotTest { @@ -59,28 +60,4 @@ public class SnapshotTest { assertEquals(Boolean.FALSE, snapshot.getLast()); } - @Test - public void testRootProjectIdOfProjects() { - ResourceModel resource = new ResourceModel(); - resource.setQualifier("TRK"); - resource.setId(3); - - Snapshot snapshot = new Snapshot(resource, null); - assertThat(snapshot.getRootProjectId(), is(3)); - } - - @Test - public void testRootProjectIdOfModules() { - ResourceModel parentResource = new ResourceModel(); - parentResource.setId(3); - parentResource.setQualifier("TRK"); - Snapshot parentSnapshot = new Snapshot(parentResource, null); - - ResourceModel resource = new ResourceModel(); - resource.setId(4); - resource.setQualifier("BRC"); - Snapshot snapshot = new Snapshot(resource, parentSnapshot); - assertThat(snapshot.getRootProjectId(), is(3)); - } - } |